Skip to content

Commit

Permalink
Re-instantiate accidentally dropped comment
Browse files Browse the repository at this point in the history
  • Loading branch information
odersky committed Jul 9, 2022
1 parent 116a48b commit 0186d23
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 20 deletions.
5 changes: 4 additions & 1 deletion tests/semanticdb/expect/i5854.expect.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package i5854

class B/*<-i5854::B#*/ {
val a/*<-i5854::B#a.*/: String/*->scala::Predef.String#*/ = (((1: Any/*->scala::Any#*/): b/*->i5854::B#b.*/.A): Nothing/*->scala::Nothing#*/): String/*->scala::Predef.String#*/
// Known issue: Can't lookup the symbol of `b.A`
// we have to register the symbol of `b { type A }` to the refinementSymtab first
// then resolve, or assign same semanticdb symbol for both
// fake symbol for b.A, and real symbol of A in b val a: String = (((1: Any): b.A): Nothing): String
val b/*<-i5854::B#b.*/: { type A/*<-local0*/ >: Any/*->scala::Any#*/ <: Nothing/*->scala::Nothing#*/ } = loop/*->i5854::B#loop().*/() // error
def loop/*<-i5854::B#loop().*/(): Nothing/*->scala::Nothing#*/ = loop/*->i5854::B#loop().*/()
}
5 changes: 4 additions & 1 deletion tests/semanticdb/expect/i5854.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package i5854

class B {
val a: String = (((1: Any): b.A): Nothing): String
// Known issue: Can't lookup the symbol of `b.A`
// we have to register the symbol of `b { type A }` to the refinementSymtab first
// then resolve, or assign same semanticdb symbol for both
// fake symbol for b.A, and real symbol of A in b val a: String = (((1: Any): b.A): Nothing): String
val b: { type A >: Any <: Nothing } = loop() // error
def loop(): Nothing = loop()
}
29 changes: 11 additions & 18 deletions tests/semanticdb/metac.expect
Original file line number Diff line number Diff line change
Expand Up @@ -3931,34 +3931,27 @@ Schema => SemanticDB v4
Uri => i5854.scala
Text => empty
Language => Scala
Symbols => 6 entries
Occurrences => 16 entries
Symbols => 5 entries
Occurrences => 10 entries

Symbols:
i5854/B# => class B extends Object { self: B => +4 decls }
i5854/B# => class B extends Object { self: B => +3 decls }
i5854/B#`<init>`(). => primary ctor <init> (): B
i5854/B#a. => val method a String
i5854/B#b. => val method b Object { type A >: Any <: Nothing }
i5854/B#loop(). => method loop (): Nothing
local0 => type A >: Any <: Nothing

Occurrences:
[0:8..0:13): i5854 <- i5854/
[2:6..2:7): B <- i5854/B#
[3:6..3:7): a <- i5854/B#a.
[3:9..3:15): String -> scala/Predef.String#
[3:24..3:27): Any -> scala/Any#
[3:30..3:31): b -> i5854/B#b.
[3:36..3:43): Nothing -> scala/Nothing#
[3:46..3:52): String -> scala/Predef.String#
[4:6..4:7): b <- i5854/B#b.
[4:16..4:17): A <- local0
[4:21..4:24): Any -> scala/Any#
[4:28..4:35): Nothing -> scala/Nothing#
[4:40..4:44): loop -> i5854/B#loop().
[5:6..5:10): loop <- i5854/B#loop().
[5:14..5:21): Nothing -> scala/Nothing#
[5:24..5:28): loop -> i5854/B#loop().
[7:6..7:7): b <- i5854/B#b.
[7:16..7:17): A <- local0
[7:21..7:24): Any -> scala/Any#
[7:28..7:35): Nothing -> scala/Nothing#
[7:40..7:44): loop -> i5854/B#loop().
[8:6..8:10): loop <- i5854/B#loop().
[8:14..8:21): Nothing -> scala/Nothing#
[8:24..8:28): loop -> i5854/B#loop().

expect/i9727.scala
------------------
Expand Down

0 comments on commit 0186d23

Please sign in to comment.