summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiark Rompf <tiark.rompf@epfl.ch>2010-03-15 15:48:28 +0000
committerTiark Rompf <tiark.rompf@epfl.ch>2010-03-15 15:48:28 +0000
commit1dbc0d0fc13dd8e28598d3e4e1970c2d69861af2 (patch)
tree30bcf879605ae5dedf84b5781ff7bdcd2c9469a6
parent505bbf0b346b7b0cb1b18cb965f47df382f8217a (diff)
downloadscala-1dbc0d0fc13dd8e28598d3e4e1970c2d69861af2.tar.gz
scala-1dbc0d0fc13dd8e28598d3e4e1970c2d69861af2.tar.bz2
scala-1dbc0d0fc13dd8e28598d3e4e1970c2d69861af2.zip
fixed treatment of annotated types in isNumeric...
fixed treatment of annotated types in isNumericSubType. re-enabled test case. review by odersky
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Types.scala1
-rw-r--r--test/files/continuations-neg/function3.scala (renamed from test/files/continuations-neg/function3.scala.disabled)8
2 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala
index 9ca344070b..ac7a9fd864 100644
--- a/src/compiler/scala/tools/nsc/symtab/Types.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Types.scala
@@ -4828,6 +4828,7 @@ A type's typeSymbol should never be inspected directly.
}
def isNumericSubType(tp1: Type, tp2: Type) =
+ isNumericValueType(tp1) && isNumericValueType(tp2) &&
isNumericSubClass(tp1.typeSymbol, tp2.typeSymbol)
def lub(ts: List[Type]): Type = lub(ts, lubDepth(ts))
diff --git a/test/files/continuations-neg/function3.scala.disabled b/test/files/continuations-neg/function3.scala
index c4acc4c2e9..0c3f1667e5 100644
--- a/test/files/continuations-neg/function3.scala.disabled
+++ b/test/files/continuations-neg/function3.scala
@@ -4,12 +4,12 @@ import scala.util.continuations._
object Test {
-
+
def main(args: Array[String]): Any = {
-
+
val g: () => Int = () => shift { k: (Int=>Int) => k(7) }
-
+
println(reset(g()))
}
-
+
} \ No newline at end of file