[Nice-commit] Nice/src/bossa/syntax CustomConstructor.java,1.1,1.2
Brought to you by:
bonniot
From: <bo...@us...> - 2003-12-13 13:31:46
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv27215/src/bossa/syntax Modified Files: CustomConstructor.java Log Message: Temporary fix for the return type of a custom constructor. Index: CustomConstructor.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/CustomConstructor.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CustomConstructor.java 12 Dec 2003 14:55:01 -0000 1.1 --- CustomConstructor.java 13 Dec 2003 13:31:42 -0000 1.2 *************** *** 26,35 **** { super(new LocatedString("<init>", className.location()), Constraint.True, ! new TypeIdent(className), params, Contract.noContract); ! this.className = className; ! this.body = body; ! User.error("custom constructors are not implemented yet"); } --- 26,40 ---- { super(new LocatedString("<init>", className.location()), Constraint.True, ! returnType(className), params, Contract.noContract); ! this.className = className; ! this.body = body; ! } ! private static Monotype returnType(LocatedString className) ! { ! Monotype res = new TypeIdent(className); ! res.nullness = Monotype.sure; ! return res; } |