[Nice-commit] Nice/src/nice/tools/code Types.java,1.46,1.47
Brought to you by:
bonniot
|
From: <bo...@us...> - 2003-03-13 23:33:52
|
Update of /cvsroot/nice/Nice/src/nice/tools/code
In directory sc8-pr-cvs1:/tmp/cvs-serv23422/src/nice/tools/code
Modified Files:
Types.java
Log Message:
Higher-level and faster test for void types.
Index: Types.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/nice/tools/code/Types.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** Types.java 1 Mar 2003 00:58:28 -0000 1.46
--- Types.java 13 Mar 2003 23:33:45 -0000 1.47
***************
*** 586,592 ****
public static boolean isVoid(mlsub.typing.Monotype m)
{
! // The test to void should be more high-level than string comparison
! String rep = m.toString();
! return rep.equals("nice.lang.void");
}
--- 586,590 ----
public static boolean isVoid(mlsub.typing.Monotype m)
{
! return equivalent(m).head() == PrimitiveType.voidTC;
}
|