IncompatibleClassChangeError bug (original) (raw)

Remi Forax forax at univ-mlv.fr
Wed Jul 18 20:39:37 UTC 2018


Hi all, a build from 39a2d3a3b101 breaks my tests with an IncompatibleClassChangeError. I have isolated the issue:


import java.util.function.IntFunction;

public class ArrayGeneratorBug {

static __ByValue class Foo { private final int x;
public Foo(int x) { this.x = x; } }
private static T[] gen(IntFunction<T[]> arrayCreator) { return arrayCreator.apply(0); }
public static void main(String[] args) { Foo[] array = gen(Foo[]::new); System.out.println(array); } }

At runtime something goes wrong:

/usr/jdk/jdk-11-lworld/bin/java -XX:+EnableValhalla ArrayGeneratorBug Exception in thread "main" java.lang.IncompatibleClassChangeError: signature (I)[LArrayGeneratorBug$Foo; inconsistent value type: ArrayGeneratorBug$$Lambda$1/0x0000000800060840 ArrayGeneratorBug at ArrayGeneratorBug.gen(ArrayGeneratorBug.java:14) at ArrayGeneratorBug.main(ArrayGeneratorBug.java:18)

regards, Rémi



More information about the valhalla-dev mailing list