Skip to content

avoid UnionType and IntersectionType #567

Description

@chochos

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions