Skip to content

Compilation errors with latest nightly build #3948

Description

@ptziegler

Consider the following snippet:

import java.util.Collections;
import java.util.List;
import java.util.function.BiConsumer;
import java.util.function.Function;

public class Foo {
    private List<? extends Bar> value;
    
    public void set(List<? extends Bar> value) {
        this.value = value;
    }
    
    public List<Bar> get() {
        return Collections.unmodifiableList(value);
    }
    
    public static void main(String[] args) {
        test(Foo::get, Foo::set);
    }
    
    public static <U> void test(Function<Foo, List<U>> getter, BiConsumer<Foo, List<? extends U>> setter) {
        // noop
    }
    
    public static interface Bar{}
}

This snippet compiles with the M1, but not with the I20250419-0820:

Image

Metadata

Metadata

Labels

compilerEclipse Java Compiler (ecj) related issuesneedinfoFurther information is requested

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions