File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
compiler/src/dotty/tools/dotc/core
presentation-compiler/test/dotty/tools/pc/tests/definition Expand file tree Collapse file tree 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 {
339339 case cls : ClassSymbol => cls.rootTreeContaining(name.toString)
340340 case _ => EmptyTree
341341 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
343343 targets.match
344344 case (tp : NamedType ) :: _ => tp.symbol.sourceSymbol
345345 case _ => this
Original file line number Diff line number Diff line change @@ -263,6 +263,17 @@ class PcDefinitionSuite extends BasePcDefinitionSuite:
263263 |""" .stripMargin
264264 )
265265
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+
266277 @ Test def `named-arg-local` =
267278 check(
268279 """ |
You can’t perform that action at this time.
0 commit comments