Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv1807/src/bossa/syntax
Modified Files:
TypeIdent.java GlobalTypeScope.java ClassExp.java
Log Message:
Made Object a super-type of every monotype.
Index: TypeIdent.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/TypeIdent.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** TypeIdent.java 9 Jul 2003 23:03:20 -0000 1.24
--- TypeIdent.java 3 Dec 2003 21:50:41 -0000 1.25
***************
*** 79,87 ****
TypeSymbol res = resolveToTypeSymbol(scope);
! if (res instanceof MonotypeVar)
! {
! MonotypeVar v = (MonotypeVar) res;
! return v;
! }
if (res instanceof TypeConstructor)
--- 79,84 ----
TypeSymbol res = resolveToTypeSymbol(scope);
! if (res instanceof mlsub.typing.Monotype)
! return (mlsub.typing.Monotype) res;
if (res instanceof TypeConstructor)
Index: GlobalTypeScope.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/GlobalTypeScope.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** GlobalTypeScope.java 22 Mar 2003 12:43:21 -0000 1.6
--- GlobalTypeScope.java 3 Dec 2003 21:50:41 -0000 1.7
***************
*** 31,34 ****
--- 31,38 ----
super(null);
set = new HashSet();
+
+ try {
+ addMapping("java.lang.Object", mlsub.typing.TopMonotype.instance);
+ } catch (DuplicateName ex) {}
}
Index: ClassExp.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ClassExp.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** ClassExp.java 24 Jun 2003 15:28:19 -0000 1.11
--- ClassExp.java 3 Dec 2003 21:50:41 -0000 1.12
***************
*** 65,70 ****
fullName = root.name.append(".").append(fullName).toString();
! mlsub.typing.TypeConstructor tc = (mlsub.typing.TypeConstructor)
! Node.getGlobalTypeScope().lookup(fullName, name.location());
if(tc != null)
--- 65,70 ----
fullName = root.name.append(".").append(fullName).toString();
! mlsub.typing.TypeConstructor tc =
! Node.getGlobalTypeScope().globalLookup(fullName, name.location());
if(tc != null)
|