aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/TypeParamInfo.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-07-12 17:12:59 +0200
committerMartin Odersky <odersky@gmail.com>2016-07-12 18:14:04 +0200
commit84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb (patch)
tree0cb537aeafff402970ce51c0790cd9ba4e8de846 /src/dotty/tools/dotc/core/TypeParamInfo.scala
parentcdebd91712b36b048233d7cf9501cc7a5bb50b31 (diff)
downloaddotty-84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb.tar.gz
dotty-84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb.tar.bz2
dotty-84a1a7ae7b1e4931fe04a5a21a04bb858e8acebb.zip
Avoid dealiasing on type application
When applying a type alias of a type lambda, keep the original application instead of reducing. But reduce anyway if - the reduced type is an application where the type constructor has the same kind as the original type constructor, or - some of the arguments are wildcards.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeParamInfo.scala')
-rw-r--r--src/dotty/tools/dotc/core/TypeParamInfo.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/TypeParamInfo.scala b/src/dotty/tools/dotc/core/TypeParamInfo.scala
index 1d79e4204..647c895db 100644
--- a/src/dotty/tools/dotc/core/TypeParamInfo.scala
+++ b/src/dotty/tools/dotc/core/TypeParamInfo.scala
@@ -1,6 +1,6 @@
package dotty.tools.dotc.core
-import Names.Name
+import Names.TypeName
import Contexts.Context
import Types.{Type, TypeBounds}
@@ -15,22 +15,22 @@ trait TypeParamInfo {
def isTypeParam(implicit ctx: Context): Boolean
/** The name of the type parameter */
- def paramName(implicit ctx: Context): Name
+ def paramName(implicit ctx: Context): TypeName
/** The info of the type parameter */
def paramBounds(implicit ctx: Context): TypeBounds
/** The info of the type parameter as seen from a prefix type.
* For type parameter symbols, this is the `memberInfo` as seen from `prefix`.
- * For type lambda parameters, it's the same as `paramBounds` as
+ * For type lambda parameters, it's the same as `paramBounds` as
* `asSeenFrom` has already been applied to the whole type lambda.
*/
def paramBoundsAsSeenFrom(pre: Type)(implicit ctx: Context): TypeBounds
-
+
/** The parameter bounds, or the completer if the type parameter
* is an as-yet uncompleted symbol.
*/
- def paramBoundsOrCompleter(implicit ctx: Context): Type
+ def paramBoundsOrCompleter(implicit ctx: Context): Type
/** The variance of the type parameter */
def paramVariance(implicit ctx: Context): Int