Closed
Description
Although all the examples of opaque types define them in objects, I didn't see any mention in the proposal of opaque types being intentionally disallowed in classes, so I guess it is an issue of the implementation.
Test code:
class C {
opaque type T = Int
}
Output:
-- Error: opaque-class.scala:2:2 -----------------------------------
2 | opaque type T = Int
| ^
|type T in object T cannot be accessed as a member of C.this.T.type from class C.
one error found