-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
The attached code compiles when it should not. The commented out line:
setCell(PointB, cell2d)
gives the appropriat error:
The callee method cannot accept actual arguments with types: 'Point3D, Cell[Point2D]; expected types __generic__T.T, Cell[__generic__T.T]' at location file test.wyv on line 41 column 1
But we also expect this error on this line:
setCell(pointA, cell3d)
Which compiles even with explicit [Point2D] annotation:
setCell[Point2D](pointA, cell3d)
It appears the type member subtype check for bounds is the cause of this so invariance cannot be enforced. A final proper fix would be to implement the full decidable type checking of type members form Julian's PhD thesis of course!
Rename this file back to .wyv as GitBug blocks it:
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels