You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
@FunctionalInterface
public
interface BiIntPredicate<T> {
boolean test(T t, int u);
}
@FunctionalInterface
public
interface BiIntFunction<T, R> {
R apply(T t, int u);
}
shared BiIntPredicate<T> toBiIntPredicate<T>(Boolean(T, Integer) fn) given T satisfies Object {
return object satisfies BiIntPredicate<T> {
shared actual Boolean test(T t, Integer u) {
return fn(t, u);
}
};
}
shared BiIntFunction<T, R> toBiIntFunction<T, R>(R(T, Integer) fn) given T satisfies Object given R satisfies Object {
return object satisfies BiIntFunction<T, R> {
shared actual R apply(T t, Integer u) {
return fn(t, u);
}
};
}
Ceylon IDE shows no problems.
But after ceylon compile we see:
error: Ceylon backend error: name clash: test(T#1,int) in anonymous_0_ and test(T#2,int) in BiIntPredicate have the same erasure, yet neither overrides the other
shared actual Boolean test(T t, Integer u) {
^
where T#1,T#2 are type-variables:
T#1 extends Object declared in method <T#1>toBiIntPredicate(TypeDescriptor,Callable<? extends Boolean>)
T#2 extends Object declared in interface BiIntPredicate
source/problemcode.ceylon:15: error: Ceylon backend error: name clash: apply(T#1,int) in anonymous_1_ and apply(T#2,int) in BiIntFunction have the same erasure, yet neither overrides the other
shared actual R apply(T t, Integer u) {
^
where T#1,R#1,T#2,R#2 are type-variables:
T#1 extends Object declared in method <T#1,R#1>toBiIntFunction(TypeDescriptor,TypeDescriptor,Callable<? extends R#1>)
R#1 extends Object declared in method <T#1,R#1>toBiIntFunction(TypeDescriptor,TypeDescriptor,Callable<? extends R#1>)
T#2 extends Object declared in interface BiIntFunction
R#2 extends Object declared in interface BiIntFunction
2 errors
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Next code:
Ceylon IDE shows no problems.
But after ceylon compile we see:
The text was updated successfully, but these errors were encountered: