Describe the bug
the "auto" return type on a method with a intersection return type leads to a compilation error
To Reproduce
Steps to reproduce the behavior:
- Create a simple class with a method with auto return type and an intersection actual type
- Compile the java file
- Get an error like "error: error while generating class Main
(illegal signature attribute for type INT#1)"
Expected behavior
The compilation is successful
Screenshots
Desktop (please complete the following information):
- OS Type & Version: Manjaro Linux
- Java/JDK version: OpenJDK 25
- IDE version (IntelliJ IDEA or Android Studio): 2026.1
- Manifold version: 2026.1.6
- Manifold IntelliJ plugin version: 2026.1.7
Additional context
Gradle compilation with
tasks.withType<JavaCompile> {
options.compilerArgs.add("-Xplugin:Manifold")
}
of a java file
import manifold.ext.rt.api.auto;
import java.util.List;
public class Main {
public static auto x() {
return List.of(1, "2");
}
static void main(String[] args) throws Exception {
var method = Main.class.getMethod("x");
System.out.println(method.getGenericReturnType());
}
}
Stack trace
error: error while generating class Main
(illegal signature attribute for type INT#1)
error: error while generating class Main
where INT#1,INT#2 are intersection types:
INT#1 extends Object,Serializable,Comparable<? extends INT#2>,Constable,ConstantDesc
INT#2 extends Object,Serializable,Comparable<?>,Constable,ConstantDesc
1 error
Describe the bug
the "auto" return type on a method with a intersection return type leads to a compilation error
To Reproduce
Steps to reproduce the behavior:
(illegal signature attribute for type INT#1)"
Expected behavior
The compilation is successful
Screenshots
Desktop (please complete the following information):
Additional context
Gradle compilation with
of a java file
Stack trace