This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Verifier error when passing untyped variable as boolean parameter


Jocelyn Paine wrote:

>A verifier error occurs when using the code below which passes an untyped
>variable to a function which expects a boolean.
>
I've checked in patches for this.  The critical change I believe is 
attached.



Index: StackTarget.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/expr/StackTarget.java,v
retrieving revision 1.6
diff -u -r1.6 StackTarget.java
--- StackTarget.java	2000/10/24 05:08:10	1.6
+++ StackTarget.java	2001/09/21 17:31:08
@@ -35,7 +35,7 @@
       }
 
     stackType.emitCoerceToObject(code);
-    return stackType.isSubtype(type);
+    return type instanceof ClassType && stackType.isSubtype(type);
   }
 
   public void compileFromStack(Compilation comp, Type stackType)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]