-
Bug
-
Resolution: Fixed
-
High
-
3.2.0
-
None
The following piece of code fails to be instrumented
public class Fails<N> { public final <S extends N> Iterable<S> depthFirstTraversal(Class<S> type) { return (Iterable<S>) depthFirstTraversal(e -> type.isInstance(e)); } public final Iterable<N> depthFirstTraversal(Predicate<? super N> predicate) { return null; } }
Javac gives the following error message:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project cake-util: Compilation failure: Compilation failure:
[ERROR] /Users/kasperni/workspace/CAKE/cake-util/cake-util/target/clover/src-instrumented/org/cakeframework/internal/util/tree/Fails.java:[27,67] reference to depthFirstTraversal is ambiguous
[ERROR] both method <S>depthFirstTraversal(java.lang.Class<S>) in org.cakeframework.internal.util.tree.Fails and method depthFirstTraversal(java.util.function.Predicate<? super N>) in org.cakeframework.internal.util.tree.Fails match
[ERROR] /Users/kasperni/workspace/CAKE/cake-util/cake-util/target/clover/src-instrumented/org/cakeframework/internal/util/tree/Fails.java:[27,86] incompatible types: cannot infer type-variable(s) I,T
[ERROR] (argument mismatch; java.lang.Class is not a functional interface)
[ERROR] -> [Help 1]
- has a derivative of
-
CLOV-1465 Instrumentation of expression-like lambdas with no compilation errors in all cases
- Closed
- is duplicated by
-
CLOV-1463 Java 1.8 stream example instrumentation fails
- Closed
-
CLOV-1464 1.8 instrumentation fails
- Closed
- relates to
-
CLOV-1451 Fix uncheched warnings for code instrumented by Clover
- Closed