[Nice-commit] Nice/stdlib/nice/lang/inline Instanceof.java,1.1,1.2
Brought to you by:
bonniot
From: <bo...@us...> - 2003-02-20 15:05:24
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang/inline In directory sc8-pr-cvs1:/tmp/cvs-serv13487/stdlib/nice/lang/inline Modified Files: Instanceof.java Log Message: Disable `instanceof` om primitive types (fixes #687308). Index: Instanceof.java =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/inline/Instanceof.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Instanceof.java 6 Jul 2002 10:42:30 -0000 1.1 --- Instanceof.java 20 Feb 2003 15:05:16 -0000 1.2 *************** *** 43,46 **** --- 43,50 ---- Type type = (Type) ((QuoteExp) args[1]).getValue(); + if (type instanceof PrimType) + throw new bossa.util.UserError + (exp, "instanceof cannot be used with primitive types"); + value.compile(comp, Target.pushObject); code.emitInstanceof(type); |