Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

solution for immediate problem in #442

  • Loading branch information...
commit e905a4108c8c4632c9a490bc3bc506c3e3d4928a 1 parent 815dcba
@gavinking gavinking authored
View
11 src/com/redhat/ceylon/compiler/typechecker/model/ProducedType.java
@@ -469,6 +469,17 @@ public ProducedType getType() {
List<ProducedType> caseTypes = getCaseTypes();
if (caseTypes!=null) {
for (ProducedType t: caseTypes) {
+ boolean already = false;
+ for (ProducedType pt: list) {
+ if (t.getDeclaration() instanceof UnionType ||
+ t.getDeclaration() instanceof IntersectionType ||
+ (t.getDeclaration().equals(pt.getDeclaration()) &&
+ t.isExactly(pt, true))) {
+ already=true;
+ break;
+ }
+ }
+ if (already) continue;
List<ProducedType> candidates = t.getSupertypes();
for (ProducedType st: candidates) {
boolean include = true;
View
7 test/main/typing/SelfType.ceylon
@@ -68,4 +68,9 @@ class SelfTypeEquivalence4() {
Inv<X> l2 { throw; }
Inv<Self<X>> l3 = l2;
@error Inv<X> l4 = l1;
-}
+}
+
+interface Aa {}
+@error interface Bb satisfies Comparable<Bb&Aa> {}
+@error interface Cc satisfies Comparable<Cc|Aa> {}
+@error interface Zz satisfies Comparable<Bb|Cc|Aa> {}
Please sign in to comment.
Something went wrong with that request. Please try again.