You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gaelrenoux
changed the title
Opaque type parameter partially loses opacity when in different compilation unit
Opaque type parameter partially loses opacity when in compiled separately
Nov 13, 2024
gaelrenoux
changed the title
Opaque type parameter partially loses opacity when in compiled separately
Opaque type parameter partially loses opacity when compiled separately
Nov 13, 2024
Compiler version
3.5.2
Minimized code
src/main/scala/definition.scala
src/test/scala/usage.scala
Output
The code compiles.
Expectation
The code shouldn't compile, as the expected argument for
has
is of typeSlotId
.Further investigations
If both files are compiled together (both in
src/main/scala
or both insrc/test/scala
), the code doesn't compile, as expected.The following line doesn't compile in
usage.scala
, as expected:If defining the opaque type using a parameterized type in
definition.scala
, for example:the final line of
usage.scala
doesn't compile, as expected.The text was updated successfully, but these errors were encountered: