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
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:
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:
test.wyv.txt
The text was updated successfully, but these errors were encountered: