Way to print type inference engine progress?

Cesar Soares Lucas Divino.Cesar at microsoft.com
Tue Feb 2 01:31:16 UTC 2021

Hey there,

I'm debugging a portion of Java 11 code that seems to be hitting a problem like the bugs reported here [1][2]. I'm not very familiar with javac internals so I'm wondering if there is a way to make the type inference engine operate in verbose mode so I can get a list of type/constraints that it resolved during the evaluation of a Java statement.

I have a piece of code similar to the one below and I wanted to see all types the engine considered for each method:

Workflow<Map<FeatureSourceKey, Document<?>>> result = Workflow
        batchResult -> batchResult
        .map(item -> getReMixBulkResponseItemValue(item))
        .collect(Collectors.toMap(d -> null, Function.identity())));

Is this possible?


[1] https://bugs.openjdk.java.net/browse/JDK-8222171
[2] https://bugs.openjdk.java.net/browse/JDK-8222035

More information about the compiler-dev mailing list