Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Resolve real symbol from nested refined type
  • Loading branch information
tanishiking committed Mar 31, 2022
commit 9375ab15c7d3bc935b2e1a0f51593d028c1c5411
6 changes: 6 additions & 0 deletions compiler/src/dotty/tools/dotc/semanticdb/TypeOps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,12 @@ class TypeOps:
enterRefined(expr.resType)
case m: LambdaType =>
enterRefined(m.resType)
case AndType(t1, t2) =>
enterRefined(t1)
enterRefined(t2)
case OrType(t1, t2) =>
enterRefined(t1)
enterRefined(t2)
case _ => ()
}
if sym.exists && sym.owner.exists then
Expand Down
2 changes: 1 addition & 1 deletion tests/semanticdb/expect/Advanced.expect.scala
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ object Test/*<-advanced::Test.*/ {

// see: https://github.com/lampepfl/dotty/pull/14608#discussion_r835642563
lazy val foo/*<-advanced::Test.foo.*/: (reflect.Selectable/*->scala::reflect::Selectable#*/ { type A/*<-local16*/ = Int/*->scala::Int#*/ }) &/*->scala::`&`#*/ (reflect.Selectable/*->scala::reflect::Selectable#*/ { type A/*<-local17*/ = Int/*->scala::Int#*/; val a/*<-local18*/: A/*->local17*/ }) = ???/*->scala::Predef.`???`().*/
def bar/*<-advanced::Test.bar().*/: foo/*->advanced::Test.foo.*/.A/*->local19*/ = foo/*->advanced::Test.foo.*/.a
def bar/*<-advanced::Test.bar().*/: foo/*->advanced::Test.foo.*/.A/*->local17*/ = foo/*->advanced::Test.foo.*/.a
}


Expand Down
Loading