diff options
author | Martin Odersky <odersky@gmail.com> | 2015-09-21 13:51:36 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-09-21 13:51:36 +0200 |
commit | 1ba3d612bce92b468fa3232a3157c2a49c48d741 (patch) | |
tree | 430358011c07ff17fef9db8e728057416a995106 /src/dotty/tools/dotc/core/TypeApplications.scala | |
parent | 71e3133ef65b06a5bce605cd4f0ebf879cc05118 (diff) | |
download | dotty-1ba3d612bce92b468fa3232a3157c2a49c48d741.tar.gz dotty-1ba3d612bce92b468fa3232a3157c2a49c48d741.tar.bz2 dotty-1ba3d612bce92b468fa3232a3157c2a49c48d741.zip |
Fixes to comments suggested by reviewer
Fixes suggested by @marter when reviewing previous hk PR.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeApplications.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeApplications.scala | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala index d7d205be6..927c4fcc5 100644 --- a/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/src/dotty/tools/dotc/core/TypeApplications.scala @@ -137,7 +137,7 @@ class TypeApplications(val self: Type) extends AnyVal { def isSafeLambda(implicit ctx: Context): Boolean = LambdaClass(forcing = false).exists - /** Is type `tp` a Lambda with all Arg$ fields fully instantiated? */ + /** Is type `tp` a Lambda with all hk$i fields fully instantiated? */ def isInstantiatedLambda(implicit ctx: Context): Boolean = isSafeLambda && typeParams.isEmpty @@ -211,7 +211,7 @@ class TypeApplications(val self: Type) extends AnyVal { } case tp: RefinedType => val redux = tp.EtaReduce - if (redux.exists) redux.appliedTo(args) // Rewrite ([HK$0] => C[HK$0])(T) to C[T] + if (redux.exists) redux.appliedTo(args) // Rewrite ([hk$0] => C[hk$0])(T) to C[T] else tp.derivedRefinedType( instantiate(tp.parent, original), tp.refinedName, @@ -473,7 +473,7 @@ class TypeApplications(val self: Type) extends AnyVal { * - `bounds` consists of type declarations `type hk$i >: toHK(L) <: toHK(U), * one for each type parameter in `T` with non-trivial bounds L,U. * - `toHK` is a substitution that replaces every bound symbol sym_i by - * `this.Arg$i`. + * `this.hk$i`. * * TypeBounds are lambda abstracting by lambda abstracting their upper bound. * @@ -516,7 +516,7 @@ class TypeApplications(val self: Type) extends AnyVal { /** Convert a type constructor `TC` with type parameters `T1, ..., Tn` to * - * LambdaXYZ { Apply = TC[$hkArg$0, ..., $hkArg$n] } + * LambdaXYZ { Apply = TC[hk$0, ..., hk$n] } * * where XYZ is a corresponds to the variances of the type parameters. */ @@ -617,8 +617,8 @@ class TypeApplications(val self: Type) extends AnyVal { * the type parameters of `B` match one-by-one the variances of `tparams`, * and where the lambda abstracted type * - * LambdaXYZ { type Apply = B[$hkArg$0, ..., $hkArg${n-1}] } - * { type $hkArg$0 = T1; ...; type $hkArg${n-1} = Tn } + * LambdaXYZ { type Apply = B[hk$0, ..., hk${n-1}] } + * { type hk$0 = T1; ...; type hk${n-1} = Tn } * * satisfies predicate `p`. Try base types in the order of their occurrence in `baseClasses`. * A type parameter matches a variance V if it has V as its variance or if V == 0. |