Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv31453/src/bossa/syntax
Modified Files:
NewArrayExp.java
Log Message:
Restore the ability to do 'new Object[...]'.
Index: NewArrayExp.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NewArrayExp.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** NewArrayExp.java 5 Oct 2003 14:21:33 -0000 1.17
--- NewArrayExp.java 11 Dec 2003 23:41:57 -0000 1.18
***************
*** 107,110 ****
--- 107,125 ----
monotype = bossa.syntax.Monotype.maybe(raw);
}
+ else if (resolvedType == mlsub.typing.TopMonotype.instance)
+ {
+ monotype = mlsub.typing.TopMonotype.instance;
+ if (nullVars != null)
+ {
+ monotype = MonotypeConstructor.apply(nullVars[nullVars.length - 1],
+ monotype);
+ cst = new Constraint(nullVars, null);
+ }
+ else
+ {
+ monotype = bossa.syntax.Monotype.maybe(monotype);
+ cst = Constraint.True;
+ }
+ }
else
{
|