File tree 2 files changed +12
-1
lines changed
compiler/src/dotty/tools/dotc/core
presentation-compiler/test/dotty/tools/pc/tests/definition 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ object Symbols extends SymUtils {
339
339
case cls : ClassSymbol => cls.rootTreeContaining(name.toString)
340
340
case _ => EmptyTree
341
341
val targets = root.collectSubTrees:
342
- case tree : DefDef if tree.name == name => methPart(tree.rhs).tpe
342
+ case tree : DefDef if tree.symbol == denot.symbol => methPart(tree.rhs).tpe
343
343
targets.match
344
344
case (tp : NamedType ) :: _ => tp.symbol.sourceSymbol
345
345
case _ => this
Original file line number Diff line number Diff line change @@ -263,6 +263,17 @@ class PcDefinitionSuite extends BasePcDefinitionSuite:
263
263
|""" .stripMargin
264
264
)
265
265
266
+ @ Test def exportTerm1Overload =
267
+ check(
268
+ """ trait Foo:
269
+ | def <<meth>>(x: Int): Int
270
+ | def meth(x: String): String
271
+ |class Bar(val foo: Foo):
272
+ | export foo.*
273
+ | def test(bar: Bar) = bar.me@@th(0)
274
+ |""" .stripMargin
275
+ )
276
+
266
277
@ Test def `named-arg-local` =
267
278
check(
268
279
""" |
You can’t perform that action at this time.
0 commit comments