This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[gcjx] Patch: FYI: class literal fixlet
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 01 Dec 2005 10:17:41 -0700
- Subject: [gcjx] Patch: FYI: class literal fixlet
- Reply-to: tromey at redhat dot com
I'm checking this in on the gcjx branch.
This fixes a crash with class literals. 'void' is not a primitive
type so we must check for it explicitly.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* model/classref.cc (resolve): Handle void type specially.
Index: model/classref.cc
===================================================================
--- model/classref.cc (revision 107604)
+++ model/classref.cc (working copy)
@@ -47,7 +47,7 @@
if (global->get_compiler ()->feature_generics ())
{
model_type *boxed = klass->type ();
- if (boxed->primitive_p ())
+ if (boxed->primitive_p () || boxed == primitive_void_type)
boxed = box_primitive_type (boxed);
model_class *boxed_class = assert_cast<model_class *> (boxed);