Uploaded image for project: 'Clover'
  1. Clover
  2. CLOV-1464

1.8 instrumentation fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Low Low
    • 3.2.2
    • 3.2.2
    • Instrumentation
    • None

      public class Foo {
      
          void readString(String name, Consumer<String> consumer) {}
      
          public static List<String> LIST = Foo.create(String::new, (instance, configuration) -> {
              configuration.readString(null, e -> System.out.print(e));
          });
      
          public static <T> List<T> create(Supplier<T> supplier, BiConsumer<T, Foo> configurator) {
              return null;
          }
      }
      

      fails with
      Foo.java:[31,49] incompatible types: cannot infer type-variable(s) T,I,T
      [ERROR] (argument mismatch; I cannot be converted to java.util.function.Supplier<java.lang.String>)
      and
      Foo.java:[32,106] incompatible types: cannot infer type-variable(s) I,T
      [ERROR] (argument mismatch; java.lang.Object is not a functional interface)

              mparfianowicz Marek Parfianowicz
              4d85d3f9-8aa3-417a-bb6f-61e186be8e94 Deleted Account (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: