@@ -103,6 +103,7 @@ trait TypeOrBoundsOps extends Core {
103103 def unapply (x : ConstantType )(given ctx : Context ): Option [ConstantType ] = Some (x)
104104
105105 object ConstantType {
106+ def apply (x : Constant )(given ctx : Context ): ConstantType = internal.ConstantType_apply (x)
106107 def unapply (x : ConstantType )(given ctx : Context ): Option [Constant ] = Some (x.constant)
107108 }
108109
@@ -205,6 +206,8 @@ trait TypeOrBoundsOps extends Core {
205206 def unapply (x : AnnotatedType )(given ctx : Context ): Option [AnnotatedType ] = Some (x)
206207
207208 object AnnotatedType {
209+ def apply (underlying : Type , annot : Term )(given ctx : Context ): AnnotatedType =
210+ internal.AnnotatedType_apply (underlying, annot)
208211 def unapply (x : AnnotatedType )(given ctx : Context ): Option [(Type , Term )] =
209212 Some ((x.underlying, x.annot))
210213 }
@@ -221,6 +224,8 @@ trait TypeOrBoundsOps extends Core {
221224 def unapply (x : AndType )(given ctx : Context ): Option [AndType ] = Some (x)
222225
223226 object AndType {
227+ def apply (lhs : Type , rhs : Type )(given ctx : Context ): AndType =
228+ internal.AndType_apply (lhs, rhs)
224229 def unapply (x : AndType )(given ctx : Context ): Option [(Type , Type )] =
225230 Some ((x.left, x.right))
226231 }
@@ -237,6 +242,7 @@ trait TypeOrBoundsOps extends Core {
237242 def unapply (x : OrType )(given ctx : Context ): Option [OrType ] = Some (x)
238243
239244 object OrType {
245+ def apply (lhs : Type , rhs : Type )(given ctx : Context ): OrType = internal.OrType_apply (lhs, rhs)
240246 def unapply (x : OrType )(given ctx : Context ): Option [(Type , Type )] =
241247 Some ((x.left, x.right))
242248 }
@@ -253,6 +259,8 @@ trait TypeOrBoundsOps extends Core {
253259 def unapply (x : MatchType )(given ctx : Context ): Option [MatchType ] = Some (x)
254260
255261 object MatchType {
262+ def apply (bound : Type , scrutinee : Type , cases : List [Type ])(given ctx : Context ): MatchType =
263+ internal.MatchType_apply (bound, scrutinee, cases)
256264 def unapply (x : MatchType )(given ctx : Context ): Option [(Type , Type , List [Type ])] =
257265 Some ((x.bound, x.scrutinee, x.cases))
258266 }
@@ -263,6 +271,14 @@ trait TypeOrBoundsOps extends Core {
263271 def cases (given ctx : Context ): List [Type ] = internal.MatchType_cases (self)
264272 }
265273
274+ /**
275+ * An accessor for `scala.internal.MatchCase[_,_]`, the representation of a `MatchType` case.
276+ */
277+ def MatchCaseType (given Context ): Type = {
278+ import scala .internal .MatchCase
279+ Type (classOf [MatchCase [_,_]])
280+ }
281+
266282 given (given Context ): IsInstanceOf [ByNameType ] = internal.isInstanceOfByNameType
267283
268284 object IsByNameType
@@ -381,13 +397,16 @@ trait TypeOrBoundsOps extends Core {
381397 def unapply (x : TypeLambda )(given ctx : Context ): Option [TypeLambda ] = Some (x)
382398
383399 object TypeLambda {
400+ def apply (paramNames : List [String ], boundsFn : TypeLambda => List [TypeBounds ], bodyFn : TypeLambda => Type ): TypeLambda =
401+ internal.TypeLambda_apply (paramNames, boundsFn, bodyFn)
384402 def unapply (x : TypeLambda )(given ctx : Context ): Option [(List [String ], List [TypeBounds ], Type )] =
385403 Some ((x.paramNames, x.paramBounds, x.resType))
386404 }
387405
388406 given TypeLambdaOps : extension (self : TypeLambda ) {
389407 def paramNames (given ctx : Context ): List [String ] = internal.TypeLambda_paramNames (self)
390408 def paramBounds (given ctx : Context ): List [TypeBounds ] = internal.TypeLambda_paramBounds (self)
409+ def param (idx : Int )(given ctx : Context ) : Type = internal.TypeLambda_param (self, idx)
391410 def resType (given ctx : Context ): Type = internal.TypeLambda_resType (self)
392411 }
393412
@@ -400,6 +419,8 @@ trait TypeOrBoundsOps extends Core {
400419 def unapply (x : TypeBounds )(given ctx : Context ): Option [TypeBounds ] = Some (x)
401420
402421 object TypeBounds {
422+ def apply (low : Type , hi : Type )(given ctx : Context ): TypeBounds =
423+ internal.TypeBounds_apply (low, hi)
403424 def unapply (x : TypeBounds )(given ctx : Context ): Option [(Type , Type )] = Some ((x.low, x.hi))
404425 }
405426
0 commit comments