JRuby

<clinit> must be generated with static modifier

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: JRuby 1.0.3, JRuby 1.1RC2
  • Component/s: None
  • Labels:
    None
  • Number of attachments :
    0

Description

See below:

Index: src/org/jruby/compiler/impl/StandardASMCompiler.java
===================================================================
--- src/org/jruby/compiler/impl/StandardASMCompiler.java        (revision 4866)
+++ src/org/jruby/compiler/impl/StandardASMCompiler.java        (working copy)
@@ -289,7 +289,7 @@
         cv.visitField(ACC_STATIC | ACC_PRIVATE | ACC_FINAL, "$isClassLoaded", cg.ci(Boolean.TYPE), null, Boolean.FALSE);
         cv.visitField(ACC_STATIC | ACC_PRIVATE | ACC_FINAL, "$class", cg.ci(Class.class), null, null);
         
-        SkinnyMethodAdapter mv = new SkinnyMethodAdapter(cv.visitMethod(ACC_PUBLIC, "<clinit>", cg.sig(Void.TYPE), null, null));
+        SkinnyMethodAdapter mv = new SkinnyMethodAdapter(cv.visitMethod(ACC_PUBLIC | ACC_STATIC, "<clinit>", cg.sig(Void.TYPE), null, null));
         mv.start();
         
         // This is a little hacky...since clinit recurses, set a boolean so we don't continue trying to load class

Activity

Hide
Ola Bini added a comment -

Fixed everywhere.

Show
Ola Bini added a comment - Fixed everywhere.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: