Closed
Description
it seems that a val is not stable in TASTy unless a stable path is requested for it:
Minimized code
// before
object Consts {
val msg = "Hello World" // not stable
}
object TestConsts {
def foo = Consts.msg
}
// after
object Consts {
val msg = "Hello World" // now it is stable because of a use site
}
object TestConsts {
def foo: Consts.msg.type = Consts.msg
}
Output
before:
80: VALDEF(7) 26 [msg]
83: TYPEREF 27 [String]
85: SHAREDtype 35
87: STRINGconst 28 [Hello World]
after:
80: VALDEF(8) 26 [msg]
83: TYPEREF 27 [String]
85: SHAREDtype 35
87: STRINGconst 28 [Hello World]
89: STABLE