aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-17 22:32:10 +0200
committerMartin Odersky <odersky@gmail.com>2016-09-17 22:33:14 +0200
commit528f6b0524c465a3e795aa5bb538c680956bf6d2 (patch)
tree2a0f48e7f1ea2c9a52c15d0c9038712173804d41 /src/dotty/tools/dotc/core/Types.scala
parentc420b4cc0573e88bf301d4e020e2ad91b26806d0 (diff)
downloaddotty-528f6b0524c465a3e795aa5bb538c680956bf6d2.tar.gz
dotty-528f6b0524c465a3e795aa5bb538c680956bf6d2.tar.bz2
dotty-528f6b0524c465a3e795aa5bb538c680956bf6d2.zip
Fix #1503 - be careful where to insert an apply.
`apply` nodes should not be inserted in the result parts of a block, if-then-else, match, or try. Instead they should be added to the surrounding statement.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index cb423e186..d788b7e69 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -927,7 +927,7 @@ object Types {
def narrow(implicit ctx: Context): TermRef =
TermRef(NoPrefix, ctx.newSkolem(this))
- /** Useful for diagnsotics: The underlying type if this type is a type proxy,
+ /** Useful for diagnostics: The underlying type if this type is a type proxy,
* otherwise NoType
*/
def underlyingIfProxy(implicit ctx: Context) = this match {
@@ -935,7 +935,10 @@ object Types {
case _ => NoType
}
- // ----- Normalizing typerefs over refined types ----------------------------
+ /** If this is a FunProto or PolyProto, WildcardType, otherwise this */
+ def notApplied: Type = this
+
+ // ----- Normalizing typerefs over refined types ----------------------------
/** If this normalizes* to a refinement type that has a refinement for `name` (which might be followed
* by other refinements), and the refined info is a type alias, return the alias,