This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Re: Verifier error when passing untyped variable as boolean parameter
- To: Jocelyn Paine <popx at pop3 dot ifs dot org dot uk>
- Subject: Re: Verifier error when passing untyped variable as boolean parameter
- From: Per Bothner <per at bothner dot com>
- Date: Fri, 21 Sep 2001 12:08:45 -0700
- CC: kawa at sourceware dot cygnus dot com
- References: <Pine.LNX.4.10.10109151909020.2028-100000@pop3.ifs.org.uk>
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)