summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2009-10-29 09:13:13 +0000
committerAdriaan Moors <adriaan.moors@epfl.ch>2009-10-29 09:13:13 +0000
commit41b0aefbf54d7cff0c15e634bea1501c55daa172 (patch)
tree952724a9e148797c85d7d89117b49035d6504e68
parent9a9fece5c40f0a8198f74b37f74d4953a7bda781 (diff)
downloadscala-41b0aefbf54d7cff0c15e634bea1501c55daa172.tar.gz
scala-41b0aefbf54d7cff0c15e634bea1501c55daa172.tar.bz2
scala-41b0aefbf54d7cff0c15e634bea1501c55daa172.zip
added -Yhigher-kinded-raw switch as temporary w...
added -Yhigher-kinded-raw switch as temporary workaround for #2454
-rw-r--r--src/compiler/scala/tools/nsc/Settings.scala1
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Types.scala2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/Settings.scala b/src/compiler/scala/tools/nsc/Settings.scala
index eb6017815a..9ad8a353b8 100644
--- a/src/compiler/scala/tools/nsc/Settings.scala
+++ b/src/compiler/scala/tools/nsc/Settings.scala
@@ -835,6 +835,7 @@ trait ScalacSettings {
val Ytyperdebug = BooleanSetting ("-Ytyper-debug", "Trace all type assignements")
val Ypmatdebug = BooleanSetting ("-Ypmat-debug", "Trace all pattern matcher activity.")
val Ytailrec = BooleanSetting ("-Ytailrecommend", "Alert methods which would be tail-recursive if private or final.")
+ val YhigherKindedRaw = BooleanSetting ("-Yhigher-kinded-raw", "(temporary!) Treat raw Java types as higher-kinded types.")
// Equality specific
val logEqEq = BooleanSetting ("-Ylog-eqeq", "Log all noteworthy equality tests") .
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala
index 1183d26fc2..83ab46db9d 100644
--- a/src/compiler/scala/tools/nsc/symtab/Types.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Types.scala
@@ -1572,7 +1572,7 @@ A type's typeSymbol should never be inspected directly.
// (args.isEmpty && !typeParamsDirect.isEmpty) && !isRawType(this)
// check for isRawType: otherwise raw types are considered higher-kinded types during subtyping:
override def isHigherKinded
- = (args.isEmpty && !typeParamsDirect.isEmpty) && !isRaw(sym, args)
+ = (args.isEmpty && !typeParamsDirect.isEmpty) && (settings.YhigherKindedRaw.value || !isRaw(sym, args))
// (args.isEmpty && !typeParamsDirect.isEmpty) && (phase.erasedTypes || !sym.hasFlag(JAVA))