Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Add constructors for TypeOrBounds that are not refs or PolyType #7961
All these types are tested by splicing them into the types of
Aside from constructors,
An accessor for
Constructors added: - TypeBounds - ConstantType - AnnotatedType - AndType - OrType - TypeLambda - MatchType All these types are tested by using `=:=` to compare them to equivalent type quotes. Additional tests are included for constructors that were not added `Refinement` and `AppliedType` because they are related and would have been added were they not originally present. Aside from constructors, `TypeLambda.param(Int)` was added in order to refer to the parameters of a `TypeLambda` during construction. An accessor for `internal.MatchCase[_,_]` was also added to make the `MatchType` constructor useable in practice. Things like `TypeRef`, `TermRef`, `ThisType` are not included because I could not think of a use for them that is not better (and more safely) served by less direct methods as I used in my test code. `PolyType` is not included because to test that we would need need a way to synthesize `DefDef` declarations, which is not currently supported. `ByNameType` (or, `ExprType`) is also not testable for similar reasons.