diff options
28 files changed, 155 insertions, 419 deletions
diff --git a/test/files/jvm/backendBugUnapply.check b/test/files/jvm/backendBugUnapply.check new file mode 100644 index 0000000000..9d1e7b29c2 --- /dev/null +++ b/test/files/jvm/backendBugUnapply.check @@ -0,0 +1,2 @@ +baz +null diff --git a/test/files/jvm/backendBugUnapply.scala b/test/files/jvm/backendBugUnapply.scala new file mode 100644 index 0000000000..5461b72f91 --- /dev/null +++ b/test/files/jvm/backendBugUnapply.scala @@ -0,0 +1,20 @@ +object Test { + import scala.xml.{Node,HasKeyValue} + + def domatch(x:Node): Node = { + val hasBar = new HasKeyValue("bar") + + x match { + case Node("foo", hasBar(z), _*) => z + case _ => null + } + } + + def main(args: Array[String]): Unit = { + println(domatch(<foo bar="baz"><hi/></foo>)) + println(domatch(<foo bingo="donkey"><hi/></foo>)) + // + // assert(domatch(<foo bar="baz"><hi/></foo>).toString == "baz") + // assert(domatch(<foo bar="baz2"><hi/></foo>) == null)//, domatch(<foo bar="baz2"><hi/></foo>)) + } +} diff --git a/test/files/neg/bug0418.check b/test/files/neg/bug0418.check new file mode 100644 index 0000000000..08bd24bf29 --- /dev/null +++ b/test/files/neg/bug0418.check @@ -0,0 +1,7 @@ +bug0418.scala:2: error: not found: value Foo12340771 + null match { case Foo12340771.Bar(x) => x } + ^ +bug0418.scala:2: error: not found: value x + null match { case Foo12340771.Bar(x) => x } + ^ +two errors found diff --git a/test/pending/pos/bug0418.scala b/test/files/neg/bug0418.scala index 67007010d4..67007010d4 100644 --- a/test/pending/pos/bug0418.scala +++ b/test/files/neg/bug0418.scala diff --git a/test/files/pos/bug0305.scala b/test/files/pos/bug0305.scala new file mode 100644 index 0000000000..1219c27030 --- /dev/null +++ b/test/files/pos/bug0305.scala @@ -0,0 +1,7 @@ +object Test extends Application { + + def foo(is:Int*) = 1; + def foo(i:Int) = 2; + + assert(foo( List(3):_* ) == 1) +} diff --git a/test/pending/pos/bug573.scala b/test/files/pos/bug573.scala index b1b4f75098..694d001e3c 100644 --- a/test/pending/pos/bug573.scala +++ b/test/files/pos/bug573.scala @@ -18,11 +18,11 @@ abstract class Linked { type Node <: Node0; abstract class Node0 { + self: Node => + var next : Node = _; var prev : Node = _; - def self : Node; - def get(dir : Dir) = if (dir == BEFORE) prev; else next; private def set(dir : Dir, node : Node) = if (dir == BEFORE) prev = node; else next = node; diff --git a/test/pending/pos/bug578.scala b/test/files/pos/bug578.scala index 4899fa7f5f..6f95dd8cea 100644 --- a/test/pending/pos/bug578.scala +++ b/test/files/pos/bug578.scala @@ -1,7 +1,7 @@ object Test { val x = Nil - val x2: Nil = x + val x2: Nil.type = x val y = None - val y2:None = y + val y2: None.type = y Console.println("Okay") } diff --git a/test/files/pos/testCoercionThis.scala b/test/files/pos/testCoercionThis.scala new file mode 100644 index 0000000000..5631b33306 --- /dev/null +++ b/test/files/pos/testCoercionThis.scala @@ -0,0 +1,19 @@ +object Test { + implicit def foo2bar(foo: Foo): Bar = foo.bar + + class Foo(val bar: Bar) { + def testCoercion = { + val a: this.type = this + a.baz /* here, foo2bar is inferred by the compiler, as expected */ + } + // def testCoercionThis0 = baz + // --> error: not found: value baz + // PP: is that something we really want to work? Seems like sketchville. + // + // These work, so I moved this out of pending. + def testCoercionThis1 = this.baz + def testCoercionThis2 = (this: Foo).baz + } + + class Bar { def baz = System.out.println("baz") } +} diff --git a/test/pending/run/exc.scala b/test/files/run/exc.scala index 26f80412c0..4c7db29226 100644 --- a/test/pending/run/exc.scala +++ b/test/files/run/exc.scala @@ -1,4 +1,4 @@ -object exc1 extends Application { +object Test extends Application { def foo() = { while (true) { try { diff --git a/test/pending/run/exc1.scala b/test/files/run/exc1.scala index 48fc084dda..24856247bf 100644 --- a/test/pending/run/exc1.scala +++ b/test/files/run/exc1.scala @@ -1,5 +1,5 @@ -object exc1 extends Application { - def foo(): unit = { +object Test extends Application { + def foo(): Unit = { while (true) { try { } catch { diff --git a/test/pending/run/exc2.scala b/test/files/run/exc2.scala index 8adf9b4a37..00a269a364 100644 --- a/test/pending/run/exc2.scala +++ b/test/files/run/exc2.scala @@ -1,4 +1,4 @@ -object exc2 extends Application { +object Test extends Application { def foo() = { while (true) { try { diff --git a/test/pending/jvm/annotations.scala b/test/pending/jvm/annotations.scala deleted file mode 100644 index 98b82edad4..0000000000 --- a/test/pending/jvm/annotations.scala +++ /dev/null @@ -1,159 +0,0 @@ -object Test1 { - class Foo { - @remote - def foo: Unit = () - } - def run { - val method = classOf[Foo].getMethod("foo", Array()) - method.getExceptionTypes foreach println - } -} - -object Test2 { - import java.io.{BufferedReader,FileReader, IOException} - class Reader(fname: String) { - private val in = new BufferedReader(new FileReader(fname)) - - @throws(classOf[IOException]) - def read() = in.read() - } - def run { - val method = classOf[Reader].getMethod("read", Array()) - method.getExceptionTypes foreach println - } -} - -/* Java: -public class Main { - @Deprecated - public void foo() {} - public static void main(String[] args) throws Exception { - Method method = Class.forName("test.Main").getMethod("foo", new Class[]{}); - Annotation annotation = method.getAnnotation(Deprecated.class); - System.out.println(annotation); // @java.lang.Deprecated() - } -} -*/ -object Test3 { - import java.lang.Deprecated - class Foo { - @Deprecated - def foo: Unit = () - } - def run { - val method = classOf[Foo].getMethod("foo", Array()) - val annotation = method.getAnnotation(classOf[Deprecated]) - println(annotation) - } -} - -/* Java: -@Retention(value=RetentionPolicy.RUNTIME) -@interface Source { - public String url(); - public String mail(); -} -@Source(url="http://scala.epfl.ch", mail="scala@lists.epfl.ch") -class Foo {} -public class Main { - public static void main(String[] args) throws Exception { - Class clazz = Class.forName("test.Foo"); - Annotation[] annotations = clazz.getAnnotations(); - for (int i = 0; i < annotations.length; i++) - System.out.println(annotations[i]); - // @test.Main$Source(url=http://scala-lang.org, mail=scala@lists.epfl.ch) - } -} -*/ -object Test4 { - import test.SourceAnnotation // defined in SourceAnnotation.java - @SourceAnnotation{val value = "http://scala-lang.org", - val mails = Array("scala@lists.epfl.ch", "scala-lounge@lists.epfl.ch")} - class Foo1 - @SourceAnnotation("http://bloodsuckers.com") { val mails = Array("you@bloodsuckers.com") } - class Foo2 - @SourceAnnotation("http://bloodsuckers.com") - class Foo3 - class Foo4 { - @SourceAnnotation("file:///dev/null") - val x = 1 - } - class Foo5 { - @SourceAnnotation("file:///dev/zero") - def bar: Int = 0 - } - class Foo6 @SourceAnnotation("primary constructor")(s: String) { - // to guarantee that primary constructor annotations - // are not applied to secondary constructors - def this() = this("") - } - class Foo7(s: String) { - @SourceAnnotation("secondary constructor") - def this() = this("") - } - class Foo8(@SourceAnnotation("constructor val") val n: Int) {} - def run { - import java.lang.annotation.Annotation - import java.lang.reflect.AnnotatedElement - def printSourceAnnotations(target: AnnotatedElement) { - //print SourceAnnotation in a predefined way to insure - // against difference in the JVMs (e.g. Sun's vs IBM's) - def printSourceAnnotation(a: Annotation) { - val ann = a.asInstanceOf[SourceAnnotation] - println("@test.SourceAnnotation(mails=" + ann.mails.deepMkString("{", ",", "}") + - ", value=" + ann.value + ")") - } - val anns = target.getAnnotations() - anns foreach printSourceAnnotation - if (anns.length > 0) { - println(target) - println - } - } - printSourceAnnotations(classOf[Foo1]) - printSourceAnnotations(classOf[Foo2]) - printSourceAnnotations(classOf[Foo3]) - classOf[Foo4].getDeclaredFields foreach printSourceAnnotations - classOf[Foo4].getDeclaredMethods foreach printSourceAnnotations - classOf[Foo5].getDeclaredMethods foreach printSourceAnnotations - classOf[Foo6].getDeclaredConstructors foreach printSourceAnnotations - classOf[Foo7].getDeclaredConstructors foreach printSourceAnnotations - classOf[Foo8].getDeclaredFields foreach printSourceAnnotations - classOf[Foo8].getDeclaredMethods foreach printSourceAnnotations - } -} - -object Test5 { - import scala.reflect.BeanProperty - import java.lang.Integer - - class Count { - // we use "Integer" instead of "Int" because of Java reflection - @BeanProperty - private var count: Integer = 0 - - private val getter = - getClass().getMethod("getCount", Array[java.lang.Class[T] forSome { type T }]()) - private val setter = - getClass().getMethod("setCount", Array(classOf[Integer])) - - def get = getter.invoke(this, Array()).asInstanceOf[Integer].intValue - def set(n: Int) = setter.invoke(this, Array(new Integer(n))) - } - def run { - val count = new Count - println(count.get) - count.set(99) - println(count.get) - } -} - -object Test { - def main(args: Array[String]) { - Test1.run - Test2.run - Test3.run // requires the use of -target:jvm-1.5 - Test4.run - Test5.run - } -} diff --git a/test/pending/jvm/backendBugUnapply.scala b/test/pending/jvm/backendBugUnapply.scala deleted file mode 100644 index f8abfeb713..0000000000 --- a/test/pending/jvm/backendBugUnapply.scala +++ /dev/null @@ -1,9 +0,0 @@ -object Test { import scala.xml.{Node,HasKeyValue} - def domatch(x:Node): Node = { - val hasBar = new HasKeyValue("bar") - x match { - case Node("foo", hasBar(z), _*) => z - case _ => null - } - } -} diff --git a/test/pending/neg/scopes.scala b/test/pending/neg/scopes.scala index e38a0a3d2e..fd31ff5f72 100644 --- a/test/pending/neg/scopes.scala +++ b/test/pending/neg/scopes.scala @@ -1,18 +1,18 @@ -case class test0(x: int, x: float) +case class test0(x: Int, x: Float) object test1 { - type t = int - type t = float - val x: int = 0 - val x: float = .0f; + type t = Int + type t = Float + val x: Int = 0 + val x: Float = .0f; { - val y: int = 0 - val y: float = .0f + val y: Int = 0 + val y: Float = .0f () } - def f1(x: int, x: float) = x - def f2(x: int)(y: int, y: float) = x + y - val closure = (x: int, x: float) => x + def f1(x: Int, x: Float) = x + def f2(x: Int)(y: Int, y: Float) = x + y + val closure = (x: Int, x: Float) => x List() match { case x::x => x case Nil => Nil diff --git a/test/pending/pos/bug0305.scala b/test/pending/pos/bug0305.scala deleted file mode 100644 index 433f0e72c3..0000000000 --- a/test/pending/pos/bug0305.scala +++ /dev/null @@ -1,8 +0,0 @@ -object Test extends Application { - - def foo(is:int*) = 1; - def foo(i:int) = 2; - - Console.println( foo( List(3):_* ) ) - -} diff --git a/test/pending/pos/bug572.scala b/test/pending/pos/bug572.scala deleted file mode 100644 index 3a69cde4a6..0000000000 --- a/test/pending/pos/bug572.scala +++ /dev/null @@ -1,33 +0,0 @@ -package lampion.collections; - -object DirX { - abstract class Dir { - def reverse : Dir; - } - object BEFORE extends Dir { - def reverse = AFTER; - } - object AFTER extends Dir { - def reverse = BEFORE; - } -} -import DirX._; -abstract class Linked { - type Node <: Node0; - - abstract class Node0 { - var next : Node = _; - var prev : Node = _; - - def get(dir : Dir) = if (dir == BEFORE) prev; else next; - private def set(dir : Dir, node : Node) = - if (dir == BEFORE) prev = node; else next = node; - - def link(dir : Dir, node : Node) = { - assert(get(dir) == null); - assert(node.get(dir.reverse) == null); - set(dir, node); - node.set(dir.reverse(), node); - } - } -} diff --git a/test/pending/pos/bug579.scala b/test/pending/pos/bug579.scala deleted file mode 100644 index a0806919e0..0000000000 --- a/test/pending/pos/bug579.scala +++ /dev/null @@ -1,21 +0,0 @@ -package my.webapp.bean.stuff; - -import scala.reflect.BeanProperty - -class MyBean { - [BeanProperty] - var frombulizer: String = _; -} - -object Test extends Application { - - val x = new MyBean; - x.frombulizer = "hello" - - x.setFrombulizer ("hola") // synthetic methods comes too late for typechecking this code - - val z:String = x.frombulizer - - val zz:String = x.getFrombulizer // synthetic methods comes too late for typechecking this code - -} diff --git a/test/pending/pos/bug586.scala b/test/pending/pos/bug586.scala deleted file mode 100644 index b736e6ab43..0000000000 --- a/test/pending/pos/bug586.scala +++ /dev/null @@ -1,78 +0,0 @@ -import scala.collection.immutable.{Map, TreeMap, ListMap, ListSet, Set} -import scala.collection.{immutable=>imm, mutable=>mut} - -case class HashTreeSet[A](map: imm.Map[A, Unit]) -extends Object -with imm.Set[A] -{ - def this() = this(null) - - def size = map.size - def +(elem: A) = new HashTreeSet(map + elem -> ()) - def -(elem: A) = new HashTreeSet(map - elem) - def contains(elem: A) = map.isDefinedAt(elem) - def iterator = map.iterator.map(._1) - def empty:imm.Set[A] = new HashTreeSet[A]() -} - - -abstract class Goal2 { - type Question - val question: Question - - type Answer - def initialAnswer: Answer -} - - - -abstract class AbstractRespondersGoal -extends Goal2 // TYPEFIX -- comment out the extends Goal2 -{ -} - -class RespondersGoal( - val question: String, - rcvr: String, - signature: String, - codebase: String) -extends AbstractRespondersGoal -{ - type Question = String - type Answer = imm.Set[String] - - val initialAnswer = new HashTreeSet[String]()// TYPEFIX .asInstanceOf[Answer] -} - - -class SingleResponderGoal(val question: String, responder: String) -extends AbstractRespondersGoal -{ - type Question = String - type Answer = Set[String] - val initialAnswer = (new ListSet[String])//TYPEFIX .asInstanceOf[Answer] -} - -class RespondersGoalSet -//extends OneKindGoalSet -{ - type Question = String - type Answer = imm.Set[String] - type MyGoal = AbstractRespondersGoal - - var selector: Boolean = _ - def newGoal(question: String) //TYPEFIX :MyGoal - = { - - selector match { -// case StaticMethodSelector(method: MethodRef) => - case true => - new SingleResponderGoal(null, null) - -// case DynamicMethodSelector(signature: MethodSignature) => { -case false => { - new RespondersGoal(null, null,null,null) - } - } - } -} diff --git a/test/pending/pos/moors.scala b/test/pending/pos/moors.scala deleted file mode 100644 index 4f7346f57f..0000000000 --- a/test/pending/pos/moors.scala +++ /dev/null @@ -1,12 +0,0 @@ -object Test { - - implicit def foo2bar(foo :Foo) :Bar = foo.bar - - class Foo(val bar :Bar) { - def testCoercion ={ val a: this.type = this; a.baz /* here, foo2bar is inferred by the compiler, as expected */} - def testCoercionThis = baz // --> error: not found: value baz - def testCoercionThis = (this: Foo).baz // --> error: value baz is not a member of Foo - } - - class Bar { def baz = System.out.println("baz")} -} diff --git a/test/pending/pos/unappgadteval.scala b/test/pending/pos/unappgadteval.scala index 0c22c71dee..fce54723a1 100644 --- a/test/pending/pos/unappgadteval.scala +++ b/test/pending/pos/unappgadteval.scala @@ -1,19 +1,29 @@ -//Class hierarchy +/** Cleaned up in october 2010 by paulp. + * Hey, we should get this working. + */ + +// Class hierarchy trait Term[a] + object Var{ def unapply[a](x:Var[a]) = Some(x.name) } class Var[a] (val name : String) extends Term[a] + object Num{ def unapply(x:Num) = Some(x.value) } -class Num (val value : int) extends Term[int] -object Lam{ def unapply[b,c](l:Lam[b,c]) = Some{l.x,l.e}} -class Lam[b, c] (val x : Var[b], val e : Term[c]) extends Term[b => c] -object App{ def unapply[b,c](a:App[b,c]) = Some{a.f,a.e}} +class Num (val value : Int) extends Term[Int] + +object Lam{ def unapply[b,c](l: Lam[b,c]) = Some(l.x, l.e) } +class Lam[b, c](val x : Var[b], val e : Term[c]) extends Term[b => c] + +object App{ def unapply[b,c](a: App[b,c]) = Some(a.f, a.e) } class App[b, c] (val f : Term[b => c], val e : Term[b]) extends Term[c] -object Suc{ def unapply(a:Suc) = true } -class Suc () extends Term[int => int] + +object Suc { def unapply(a: Suc) = true } +class Suc() extends Term[Int => Int] + // Environments : abstract class Env { - def apply[a](v : Var[a]): a - def extend[a](v : Var[a], x : a) = new Env { + def apply[a](v: Var[a]): a + def extend[a](v: Var[a], x : a) = new Env { def apply[b](w: Var[b]): b = w match { case _ : v.type => x // v eq w, hence a = b case _ => Env.this.apply(w) @@ -21,15 +31,47 @@ abstract class Env { } object empty extends Env { - def apply[a](x : Var[a]): a = throw new Error("not found : "+x.name) + def apply[a](x: Var[a]): a = throw new Error("not found : "+x.name) } + object Test { -// Evaluation : -def eval[a](t : Term[a], env : Env): a = t match { - case v : Var[b] => env(v) // a = b - case n @ Num(value) => value // a = int - case i @ Suc() => { y: int => y + 1 } // a = int=>int - case f @ Lam[b,c](x,e) => { y: b => eval(e, env.extend(x, y))} // a = b=>c - case a @ App(f,e) => eval(f, env)(eval(e, env)) // a = c -} + val v1 = new Var[util.Random]("random") + val v2 = new Var[Int]("Int") + val v3 = new Var[List[String]]("list") + + val anEnv = (empty + .extend(v1, new util.Random) + .extend(v2, 58) + .extend(v3, Nil) + ) + + def eval[a](t: Term[a], env : Env): a = t match { + // First three work + case v : Var[b] => env(v) // a = b + case n @ Num(value) => value // a = Int + case a @ App(f,e) => eval(f, env)(eval(e, env)) // a = c + + // Next one fails like: + // + // found : (Int) => Int + // required: a + case i @ Suc() => { (y: Int) => y + 1 } // a = Int => Int + + // Next one fails like: + // + // error: '=>' expected but '[' found. + // case f @ Lam[b,c](x, e) => { (y: b) => eval(e, env.extend(x, y)) } // a = b=>c + // ^ + case f @ Lam[b,c](x, e) => { (y: b) => eval(e, env.extend(x, y)) } // a = b=>c + } + + val f1 = () => eval(v1, anEnv) + val f2 = () => eval(v2, anEnv) + val f3 = () => eval(v3, anEnv) + + def main(args: Array[String]): Unit = { + println(f1()) + println(f2()) + println(f3()) + } } diff --git a/test/pending/run/array_casts.scala b/test/pending/run/array_casts.scala index 9d298bbc2b..0691fe06fe 100644 --- a/test/pending/run/array_casts.scala +++ b/test/pending/run/array_casts.scala @@ -36,7 +36,7 @@ object Test { Console.println("is-seq array " + s.isInstanceOf[Array[Char]]) try { Console.println(s.asInstanceOf[Array[Int]].getClass) - } catch { case ex : ClassCastException => Console.println("Bad, arrays as seqs should still be arrays of int") } + } catch { case ex : ClassCastException => Console.println("Bad, arrays as seqs should still be arrays of Int") } () } } diff --git a/test/pending/run/bug0412.scala b/test/pending/run/bug0412.scala deleted file mode 100644 index 4610235427..0000000000 --- a/test/pending/run/bug0412.scala +++ /dev/null @@ -1,33 +0,0 @@ -object Magic { - - abstract class A[T1,T2]() { - trait C { type T; } - trait C1 extends C { type T = T1; } - trait C2 extends C { type T <: T2; } - - type CX; - - var cv: CX with C2 = _; - val c: CX with C2 = cv; - - def castA(x: c.T): T2 = x; - } - - class B[T1,T2] extends A[T1,T2]() { - type CX = C1; - - def castB(x: T1): T2 = castA(x); - } - - def cast[T1,T2](v: T1): T2 = - new B[T1,T2]().castB(v) - -} - -object Test { - - def main(args: Array[String]): Unit = { - Magic.cast[String,Exception]("xyz").printStackTrace(); - } - -} diff --git a/test/pending/run/bug0551.scala b/test/pending/run/bug0551.scala deleted file mode 100644 index ffa36d7cb0..0000000000 --- a/test/pending/run/bug0551.scala +++ /dev/null @@ -1,5 +0,0 @@ -case class A(x: int) -class B(x: int) extends A(x) -object Test extends Application { - Console.println(A(1) == new B(1)) -} diff --git a/test/pending/run/bug424.scala b/test/pending/run/bug424.scala deleted file mode 100644 index bc7a55732d..0000000000 --- a/test/pending/run/bug424.scala +++ /dev/null @@ -1,3 +0,0 @@ -object M { - def f = 3; -} diff --git a/test/pending/run/bug874.scala b/test/pending/run/bug874.scala index 29dfabe0e9..d83014651b 100644 --- a/test/pending/run/bug874.scala +++ b/test/pending/run/bug874.scala @@ -1,12 +1,12 @@ object Test { abstract class Base { val U: { - def apply[A](x1: A)(x2: int): Any + def apply[A](x1: A)(x2: Int): Any } U("xyz")(2) } class Mix extends Base { - case class U[A](x1: A)(x2: int) { + case class U[A](x1: A)(x2: Int) { Console.println("U created with "+x1+" and "+x2) } } diff --git a/test/pending/run/collections.scala b/test/pending/run/collections.scala index 6717b524bb..16a3ddb370 100644 --- a/test/pending/run/collections.scala +++ b/test/pending/run/collections.scala @@ -4,15 +4,15 @@ object Test extends Application { val printTime = false - def sum[A](xs: Iterable[int]) = (0 /: xs)((x, y) => x + y) + def sum[A](xs: Iterable[Int]) = (0 /: xs)((x, y) => x + y) - def time(op: => unit): unit = { + def time(op: => Unit): Unit = { val start = System.currentTimeMillis; op if (printTime) Console.println(" time = "+(System.currentTimeMillis - start)+"ms") } - def test(msg: String, s0: collection.immutable.Set[int]) = { + def test(msg: String, s0: collection.immutable.Set[Int]) = { Console.println("***** "+msg+":") var s = s0 s = s + 2 @@ -30,7 +30,7 @@ object Test extends Application { } } - def test(msg: String, s0: collection.mutable.Set[int]) = { + def test(msg: String, s0: collection.mutable.Set[Int]) = { Console.println("***** "+msg+":") var s = s0 s = s + 2 @@ -48,7 +48,7 @@ object Test extends Application { } } - def test(msg: String, s0: collection.immutable.Map[int, int]) = { + def test(msg: String, s0: collection.immutable.Map[Int, Int]) = { Console.println("***** "+msg+":") var s = s0 s = s + (2 -> 2) @@ -69,7 +69,7 @@ object Test extends Application { } } - def test(msg: String, s0: collection.mutable.Map[int, int]) = { + def test(msg: String, s0: collection.mutable.Map[Int, Int]) = { Console.println("***** "+msg+":") var s = s0 s = s + (2 -> 2) @@ -90,13 +90,13 @@ object Test extends Application { } } - test("immutable.ListSet", new immutable.ListSet[int]) - test("immutable.TreeSet", new immutable.TreeSet[int]) - test("mutable.HashSet", new mutable.HashSet[int]) - test("immutable.ListMap", new immutable.ListMap[int, int]) - test("immutable.TreeMap", new immutable.TreeMap[int, int]) - test("immutable.UnBalancedTreeMap", new immutable.UnbalancedTreeMap[int, int]) - test("immutable.HashTreeSet", new immutable.HashTreeSet[int]) - test("immutable.HashTreeMap", new immutable.HashTreeMap[int, int]) - test("mutable.HashMap", new mutable.HashMap[int, int]) + test("immutable.ListSet", new immutable.ListSet[Int]) + test("immutable.TreeSet", new immutable.TreeSet[Int]) + test("mutable.HashSet", new mutable.HashSet[Int]) + test("immutable.ListMap", new immutable.ListMap[Int, Int]) + test("immutable.TreeMap", new immutable.TreeMap[Int, Int]) + test("immutable.UnBalancedTreeMap", new immutable.UnbalancedTreeMap[Int, Int]) + test("immutable.HashTreeSet", new immutable.HashTreeSet[Int]) + test("immutable.HashTreeMap", new immutable.HashTreeMap[Int, Int]) + test("mutable.HashMap", new mutable.HashMap[Int, Int]) } diff --git a/test/pending/run/records.scala b/test/pending/run/records.scala index 87b15265f2..0447b6f085 100644 --- a/test/pending/run/records.scala +++ b/test/pending/run/records.scala @@ -1,10 +1,10 @@ trait C { - def f: int + def f: Int } object Test { type T = C { - def f: int + def f: Int def g: String } diff --git a/test/pending/run/t0947.scala b/test/pending/run/t0947.scala index f5daca3d30..4297bb8777 100644 --- a/test/pending/run/t0947.scala +++ b/test/pending/run/t0947.scala @@ -3,6 +3,6 @@ import scala.tools.nsc._ object Test extends Application { class Foo { override def toString = "Foo" }; - val int = new Interpreter(new Settings()); - int.bind("foo", "Test.Foo", new Test.Foo()); + val Int = new Interpreter(new Settings()); + Int.bind("foo", "Test.Foo", new Test.Foo()); } |