Skip to content

Commit 8465366

Browse files
committed
Dealias type for looking up symbols in refinements
1 parent 50a43b9 commit 8465366

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ class TypeOps:
8181
case _ =>
8282
symbolNotFound(name, tpe.typeSymbol)
8383
None
84-
loop(tpe)
84+
loop(tpe.dealias)
8585
}
8686

8787
def toSemanticSig(using LinkMode, Context, SemanticSymbolBuilder)(sym: Symbol): s.Signature =

tests/semanticdb/expect/dep-match.expect.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ object Test_depmatch/*<-_empty_::Test_depmatch.*/ {
44
case Unit/*->scala::Unit#*/ => Unit/*->scala::Unit#*/
55
}
66
inline def baz/*<-_empty_::Test_depmatch.baz().*/(foo/*<-_empty_::Test_depmatch.baz().(foo)*/: Foo/*->_empty_::Test_depmatch.Foo#*/): Unit/*->scala::Unit#*/ = {
7-
val v/*<-local1*/: Bar/*->_empty_::Test_depmatch.Bar#*/[foo/*->_empty_::Test_depmatch.baz().(foo)*/.U] = ???/*->scala::Predef.`???`().*/
7+
val v/*<-local1*/: Bar/*->_empty_::Test_depmatch.Bar#*/[foo/*->_empty_::Test_depmatch.baz().(foo)*/.U/*->local0*/] = ???/*->scala::Predef.`???`().*/
88
}
99
}

tests/semanticdb/metac.expect

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3736,7 +3736,7 @@ Uri => dep-match.scala
37363736
Text => empty
37373737
Language => Scala
37383738
Symbols => 8 entries
3739-
Occurrences => 17 entries
3739+
Occurrences => 18 entries
37403740

37413741
Symbols:
37423742
_empty_/Test_depmatch. => final object Test_depmatch extends Object { self: Test_depmatch.type => +4 decls }
@@ -3765,6 +3765,7 @@ Occurrences:
37653765
[6:8..6:9): v <- local1
37663766
[6:11..6:14): Bar -> _empty_/Test_depmatch.Bar#
37673767
[6:15..6:18): foo -> _empty_/Test_depmatch.baz().(foo)
3768+
[6:19..6:20): U -> local0
37683769
[6:24..6:27): ??? -> scala/Predef.`???`().
37693770

37703771
expect/exports-example-Codec.scala

0 commit comments

Comments
 (0)