verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handle case where field has...
authorTom Tromey <tromey@redhat.com>
Fri, 16 Nov 2001 23:39:34 +0000 (23:39 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Fri, 16 Nov 2001 23:39:34 +0000 (23:39 +0000)
* verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handle
case where field has primitive type.

From-SVN: r47112

libjava/ChangeLog
libjava/verify.cc

index 2d7835b..6c9cf85 100644 (file)
@@ -1,5 +1,8 @@
 2001-11-16  Tom Tromey  <tromey@redhat.com>
 
+       * verify.cc (_Jv_BytecodeVerifier::check_field_constant): Handle
+       case where field has primitive type.
+
        * verify.cc (_Jv_BytecodeVerifier::is_assignable_from_slow): New
        method.
        (type::compatible): Use it.
index 5dc90c6..5928ef5 100644 (file)
@@ -1545,7 +1545,9 @@ private:
                                      &name, &field_type);
     if (class_type)
       *class_type = ct;
-    return type (field_type);
+    if (field_type->data[0] == '[' || field_type->data[0] == 'L')
+      return type (field_type);
+    return get_type_val_for_signature (field_type->data[0]);
   }
 
   type check_method_constant (int index, bool is_interface,