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 @@ -319,7 +319,7 @@ object Symbols extends SymUtils {
319319 case cls : ClassSymbol => cls.rootTreeContaining(name.toString)
320320 case _ => EmptyTree
321321 val targets = root.collectSubTrees:
322- case tree : DefDef if tree.name == name => methPart(tree.rhs).tpe
322+ case tree : DefDef if tree.symbol == denot.symbol => methPart(tree.rhs).tpe
323323 targets.match
324324 case (tp : NamedType ) :: _ => tp.symbol.sourceSymbol
325325 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