Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv19033/src/bossa/syntax
Modified Files:
PolySymbol.java NiceClass.java MethodDeclaration.java
JavaMethod.java JavaConstructor.java
Log Message:
Allow retyped classes that are subclassed in the same package.
Index: PolySymbol.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/PolySymbol.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** PolySymbol.java 26 Jul 2003 22:29:47 -0000 1.15
--- PolySymbol.java 30 Aug 2003 10:37:12 -0000 1.16
***************
*** 58,63 ****
void resolve()
{
! type = syntacticType.resolveToLowlevel();
! syntacticType = null;
}
--- 58,67 ----
void resolve()
{
! // Check that resolving has not already been done.
! if (syntacticType != null)
! {
! type = syntacticType.resolveToLowlevel();
! syntacticType = null;
! }
}
Index: NiceClass.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/NiceClass.java,v
retrieving revision 1.59
retrieving revision 1.60
diff -C2 -d -r1.59 -r1.60
*** NiceClass.java 26 Aug 2003 14:21:37 -0000 1.59
--- NiceClass.java 30 Aug 2003 10:37:12 -0000 1.60
***************
*** 733,737 ****
List constructors = TypeConstructors.getConstructors(tc);
! JavaConstructor m = (JavaConstructor)
((MethodDeclaration.Symbol) constructors.get(index)).getDefinition();
return m.getConstructorInvocation();
--- 733,737 ----
List constructors = TypeConstructors.getConstructors(tc);
! JavaMethod m = (JavaMethod)
((MethodDeclaration.Symbol) constructors.get(index)).getDefinition();
return m.getConstructorInvocation();
Index: MethodDeclaration.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/MethodDeclaration.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** MethodDeclaration.java 26 Aug 2003 16:07:58 -0000 1.45
--- MethodDeclaration.java 30 Aug 2003 10:37:12 -0000 1.46
***************
*** 110,113 ****
--- 110,116 ----
public final Monotype[] getArgTypes()
{
+ if (type == null)
+ symbol.resolve();
+
return type.domain();
}
Index: JavaMethod.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/JavaMethod.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** JavaMethod.java 24 Jun 2003 15:28:19 -0000 1.27
--- JavaMethod.java 30 Aug 2003 10:37:13 -0000 1.28
***************
*** 102,105 ****
--- 102,110 ----
}
+ gnu.expr.Expression getConstructorInvocation()
+ {
+ return new QuoteExp(new InitializeProc(reflectMethod));
+ }
+
/****************************************************************
* Module interface
Index: JavaConstructor.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/JavaConstructor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** JavaConstructor.java 9 Sep 2002 12:59:26 -0000 1.2
--- JavaConstructor.java 30 Aug 2003 10:37:13 -0000 1.3
***************
*** 39,46 ****
return new QuoteExp(new InstantiateProc(reflectMethod));
}
-
- Expression getConstructorInvocation()
- {
- return new QuoteExp(new InitializeProc(reflectMethod));
- }
}
--- 39,41 ----
|