Closed
Description
object StructuralTypes {
type A = { def foo: Int }
type B = { val foo: Int }
}
dotty rejects this example:
[error] /home/sam/Documents/git/scalameta/tutorial/src/main/resources/StructuralTypes.scala:2: error: refinement method foo without matching type in parent Object
[error] type A = { def foo: Int }
[error] ^
[error] one error found
scalac accepts it, and I guess dotty should as well?
Metadata
Metadata
Assignees
Labels
No labels