Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv13836/src/bossa/syntax
Modified Files:
MethodDeclaration.java
Log Message:
Typecheck method default values with the method type parameters being rigid
(closes #741560).
Index: MethodDeclaration.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MethodDeclaration.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** MethodDeclaration.java 12 May 2003 11:11:44 -0000 1.40
--- MethodDeclaration.java 26 May 2003 20:52:27 -0000 1.41
***************
*** 144,147 ****
--- 144,161 ----
try{
type.getConstraint().enter();
+
+ /*
+ We typecheck with rigid type parameters. It means that
+ default values must be valid for any instance of the method type.
+
+ Alternatively, it could be decided that it is ok to have default
+ values that satisfy only specific instances. In that case, it would
+ be necessary to do some changes in K0. The difficulty is with
+ overloading: the (now soft) type variables could be modified
+ in an unsuccesful overloading resolution, and that modifications
+ need to be discarded.
+ */
+ mlsub.typing.Typing.implies();
+
parameters.typecheck(type.domain());
}
|