aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Types.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-11-06 18:24:32 +0100
committerMartin Odersky <odersky@gmail.com>2013-11-06 18:24:48 +0100
commit34347410560f7c9091e12da310161066e8c64350 (patch)
tree036bb5ec862c94c1b91ddda5ab6cf05f78e7ddc2 /src/dotty/tools/dotc/core/Types.scala
parent044c498b08428d16ee88aadb73588a7a3337d545 (diff)
downloaddotty-34347410560f7c9091e12da310161066e8c64350.tar.gz
dotty-34347410560f7c9091e12da310161066e8c64350.tar.bz2
dotty-34347410560f7c9091e12da310161066e8c64350.zip
Avoiding to record constraints of the form P <:< P.
This will become redundant once poly params and typevars are identified.
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r--src/dotty/tools/dotc/core/Types.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala
index 305261213..d07bdc6fc 100644
--- a/src/dotty/tools/dotc/core/Types.scala
+++ b/src/dotty/tools/dotc/core/Types.scala
@@ -1972,6 +1972,7 @@ object Types {
/** Instantiate variable with given type */
def instantiateWith(tp: Type)(implicit ctx: Context): Type = {
+ assert(tp ne this)
println(s"instantiating ${this.show} with ${tp.show}") // !!!DEBUG
assert(ctx.typerState.undetVars contains this)
ctx.typerState.undetVars -= this
@@ -2004,7 +2005,7 @@ object Types {
}
/** If the variable is instantiated, its instance, otherwise its origin */
- override def stripTypeVar(implicit ctx: Context) = {
+ override def stripTypeVar(implicit ctx: Context) = { // todo: what about multiple instantiations?
val inst = instanceOpt
if (inst.exists) inst else origin
}