Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8225079

[lworld] newInstance wrong return type Internal Error

XMLWordPrintable

      Hotspot Internal Error with slowdebug build.

      When using Reflection to invoke an inline class default constructor (aka static method).

      ----
      import java.lang.reflect.Constructor;

      public inline class Point2 {
          public static void main(String[] args) throws Exception {
              Constructor<?> c = Point2.class.getConstructor();
              c.newInstance();
          }

          public int x;
          public int y;
          public Point2 () {
              x = 10;
              y = 20;
          }
      }

      # guarantee(_is_return && t == _return_type) failed: return type does not match: 14 : 12
      (modified to print actual, expected type - T_VALUETYPE vs T_OBJECT).

            hseigel Harold Seigel (Inactive)
            rriggs Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: