ceylon / ceylon-js

DEPRECATED
Apache License 2.0
54 stars 9 forks source link

avoid UnionType and IntersectionType #567

Open chochos opened 9 years ago

chochos commented 9 years ago

NEW RULES

UnionType and IntersectionType are going to go away, so code which does type.getDeclaration() instanceof UnionType is now officially going to break!

same with code that does type.getDeclaration().getCaseTypes(), type.getDeclaration().geSatisfiedTypes() etc

you now have to avoid calling ProducedType.getDeclaration() unless you absolutely have to, and except when you already know you have something that is not a union or intersection.

Instead, use type.isUnion(), type.isIntersection(), type.getSatisfiedTypes(), etc.