-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
-
Associate version on a package basis
-
Define requirements for version variables
public requirement Invertible {
for class Point { Point inverse(); }
}
public class Line ver 1 «V,W requires Invertible» {
public Point#V# p1;
public Point#W# p2;
public Line(Point#V# p1, Point#W# p2) {
this.p1 = p1; this.p2 = p2;
}
public «Y» Line«V,Y» rotate() {
return new Line«V,Y»(p1, p2.«Y»inverse());
}
}With requirements, checking can be done easily without having to infer constraints. Also, it can make it easier to understand.
Metadata
Metadata
Assignees
Labels
No labels