Update of /cvsroot/nice/Nice/src/nice/tools/typing
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23666/F:/nice/src/nice/tools/typing
Modified Files:
Types.java
Log Message:
Java methods/fields with parametric types get type parameters with UnknownType instead of being ignored.
Index: Types.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/typing/Types.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** Types.java 30 Jul 2004 19:08:43 -0000 1.8
--- Types.java 22 Nov 2004 23:21:05 -0000 1.9
***************
*** 189,192 ****
--- 189,205 ----
}
+ public static Monotype unknownArgsMonotype(TypeConstructor tc)
+ throws BadSizeEx
+ {
+ if (tc.variance == null || tc.arity() == 0)
+ return new MonotypeConstructor(tc, null);
+
+ mlsub.typing.Monotype[] args = new mlsub.typing.Monotype[tc.arity()];
+ for (int i = 0; i < tc.arity(); i++)
+ args[i] = UnknownMonotype.instance;
+
+ return new MonotypeConstructor(tc, args);
+ }
+
/****************************************************************
* Type parameters
|