Update of /cvsroot/nice/Nice/src/nice/tools/code
In directory sc8-pr-cvs1:/tmp/cvs-serv10514/F:/nice/src/nice/tools/code
Modified Files:
Gen.java
Log Message:
@type patterns are automatic replaced by at any patterns if the type is equal to the type of the declaration.
All @type and #type patterns where type is a primitive type after the previous replacement will yield an error because instanceof a primitve type make no sense (yet).
An exception is made for boolean, so instanceof boolean is made to work now.
Index: Gen.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/code/Gen.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Gen.java 29 Mar 2003 19:26:23 -0000 1.9
--- Gen.java 1 Apr 2003 20:25:07 -0000 1.10
***************
*** 25,33 ****
public static Expression instanceOfExp(Expression value, Type ct)
{
- // don't do an instanceof on primitive types. This special case
- // should not happen and should be removed when pattern.java is fixed
- if (ct instanceof PrimType)
- return QuoteExp.trueExp;
-
return Inline.inline(nice.lang.inline.Instanceof.instance, value,
new QuoteExp(ct));
--- 25,28 ----
|