Skip to content

Commit 0186d23

Browse files
committed
Re-instantiate accidentally dropped comment
1 parent 116a48b commit 0186d23

File tree

3 files changed

+19
-20
lines changed

3 files changed

+19
-20
lines changed
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package i5854
22

33
class B/*<-i5854::B#*/ {
4-
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#*/
4+
// Known issue: Can't lookup the symbol of `b.A`
5+
// we have to register the symbol of `b { type A }` to the refinementSymtab first
6+
// then resolve, or assign same semanticdb symbol for both
7+
// fake symbol for b.A, and real symbol of A in b val a: String = (((1: Any): b.A): Nothing): String
58
val b/*<-i5854::B#b.*/: { type A/*<-local0*/ >: Any/*->scala::Any#*/ <: Nothing/*->scala::Nothing#*/ } = loop/*->i5854::B#loop().*/() // error
69
def loop/*<-i5854::B#loop().*/(): Nothing/*->scala::Nothing#*/ = loop/*->i5854::B#loop().*/()
710
}

tests/semanticdb/expect/i5854.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
package i5854
22

33
class B {
4-
val a: String = (((1: Any): b.A): Nothing): String
4+
// Known issue: Can't lookup the symbol of `b.A`
5+
// we have to register the symbol of `b { type A }` to the refinementSymtab first
6+
// then resolve, or assign same semanticdb symbol for both
7+
// fake symbol for b.A, and real symbol of A in b val a: String = (((1: Any): b.A): Nothing): String
58
val b: { type A >: Any <: Nothing } = loop() // error
69
def loop(): Nothing = loop()
710
}

tests/semanticdb/metac.expect

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3931,34 +3931,27 @@ Schema => SemanticDB v4
39313931
Uri => i5854.scala
39323932
Text => empty
39333933
Language => Scala
3934-
Symbols => 6 entries
3935-
Occurrences => 16 entries
3934+
Symbols => 5 entries
3935+
Occurrences => 10 entries
39363936

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

39453944
Occurrences:
39463945
[0:8..0:13): i5854 <- i5854/
39473946
[2:6..2:7): B <- i5854/B#
3948-
[3:6..3:7): a <- i5854/B#a.
3949-
[3:9..3:15): String -> scala/Predef.String#
3950-
[3:24..3:27): Any -> scala/Any#
3951-
[3:30..3:31): b -> i5854/B#b.
3952-
[3:36..3:43): Nothing -> scala/Nothing#
3953-
[3:46..3:52): String -> scala/Predef.String#
3954-
[4:6..4:7): b <- i5854/B#b.
3955-
[4:16..4:17): A <- local0
3956-
[4:21..4:24): Any -> scala/Any#
3957-
[4:28..4:35): Nothing -> scala/Nothing#
3958-
[4:40..4:44): loop -> i5854/B#loop().
3959-
[5:6..5:10): loop <- i5854/B#loop().
3960-
[5:14..5:21): Nothing -> scala/Nothing#
3961-
[5:24..5:28): loop -> i5854/B#loop().
3947+
[7:6..7:7): b <- i5854/B#b.
3948+
[7:16..7:17): A <- local0
3949+
[7:21..7:24): Any -> scala/Any#
3950+
[7:28..7:35): Nothing -> scala/Nothing#
3951+
[7:40..7:44): loop -> i5854/B#loop().
3952+
[8:6..8:10): loop <- i5854/B#loop().
3953+
[8:14..8:21): Nothing -> scala/Nothing#
3954+
[8:24..8:28): loop -> i5854/B#loop().
39623955

39633956
expect/i9727.scala
39643957
------------------

0 commit comments

Comments
 (0)