Nice/src/mlsub/typing NullnessKind.java,1.8,1.9 Monotype.java,1.12,1.13
Daniel Bonniot <[email protected]> Sat, 18 Jun 2005 09:58:41 +0000
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
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);
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click