Closed
Description
Compiler version
3.1.1-RC1
Minimized code
// This works:
inline val `1`: 1 = 1
def get1: 1 = `1`
// But this doesn't:
opaque type One = 1
inline val One: One = 1
def getOne: One = One
// getter One is declared as erased, but is in fact used
Output
[error] 32 |def getOne: One = One
[error] | ^^^
[error] | getter One is declared as erased, but is in fact used
Expectation
It should be possible to use an inline val
of an opaque type alias for a literal type.