[Nice-commit] Nice/src/mlsub/typing NullnessKind.java,1.8,1.9 Monotype.java,1.12,1.13
Brought to you by:
bonniot
From: Daniel B. <bo...@us...> - 2005-06-18 09:58:50
|
Update of /cvsroot/nice/Nice/src/mlsub/typing In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29740/src/mlsub/typing Modified Files: NullnessKind.java Monotype.java Log Message: '?' is not a subtype of Object, only of ?Object. Index: NullnessKind.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/NullnessKind.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** NullnessKind.java 9 Jun 2005 11:57:00 -0000 1.8 --- NullnessKind.java 18 Jun 2005 09:58:39 -0000 1.9 *************** *** 38,42 **** public int arity() { return 1; } ! private static TypeConstructor maybe, sure; public Monotype freshMonotype(boolean existential) --- 38,42 ---- public int arity() { return 1; } ! static TypeConstructor maybe, sure; public Monotype freshMonotype(boolean existential) Index: Monotype.java =================================================================== RCS file: /cvsroot/nice/Nice/src/mlsub/typing/Monotype.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Monotype.java 9 Jun 2005 11:57:00 -0000 1.12 --- Monotype.java 18 Jun 2005 09:58:39 -0000 1.13 *************** *** 131,134 **** --- 131,141 ---- if (geq) { + // We must check that this monotype is not non-null + TypeConstructor head = head(); + if (head == null) + throw mlsub.typing.lowlevel.LowlevelUnsatisfiable.instance; + else + mlsub.typing.lowlevel.Engine.leq(NullnessKind.maybe, head); + Monotype raw = nice.tools.typing.Types.rawType(this); mlsub.typing.lowlevel.Engine.leq(TopMonotype.instance, raw); |