summaryrefslogtreecommitdiff
path: root/test/pending/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/run')
-rw-r--r--test/pending/run/TestFlatMap.scala6
-rw-r--r--test/pending/run/hk-lub-fail.scala2
-rw-r--r--test/pending/run/instanceOfAndTypeMatching.scala58
-rw-r--r--test/pending/run/sigtp.scala2
-rw-r--r--test/pending/run/string-reverse.scala6
-rw-r--r--test/pending/run/structural-types-vs-anon-classes.scala4
-rw-r--r--test/pending/run/t0508x.scala6
-rw-r--r--test/pending/run/t1980.scala2
-rw-r--r--test/pending/run/t2318.scala10
-rwxr-xr-xtest/pending/run/t3609.scala2
-rw-r--r--test/pending/run/t3669.scala2
-rw-r--r--test/pending/run/t3857.scala2
-rw-r--r--test/pending/run/t4283/IllegalAccess.scala2
13 files changed, 52 insertions, 52 deletions
diff --git a/test/pending/run/TestFlatMap.scala b/test/pending/run/TestFlatMap.scala
index e6fb696aa2..dd5a0a0c2f 100644
--- a/test/pending/run/TestFlatMap.scala
+++ b/test/pending/run/TestFlatMap.scala
@@ -4,7 +4,7 @@ import scala.util.Random
import scala.collection.parallel.CompositeThrowable
object Test {
-
+
def main(args: Array[String]) {
val N = 1500
val M = 1500
@@ -12,7 +12,7 @@ object Test {
var unmatchedRight = new PMHashSet[Int]
Range(0, N).foreach{ x => unmatchedLeft += x}
Range(0, M).foreach{ x => unmatchedRight += x}
-
+
try {
val matches = unmatchedLeft.flatMap{ lind: Int =>
val dists = unmatchedRight.seq.map{ rind: Int =>
@@ -25,5 +25,5 @@ object Test {
case c: CompositeThrowable => for (t <- c.throwables) println("\n%s\n%s".format(t, t.getStackTrace.mkString("\n")))
}
}
-
+
}
diff --git a/test/pending/run/hk-lub-fail.scala b/test/pending/run/hk-lub-fail.scala
index 26bd85c943..b58a86ee75 100644
--- a/test/pending/run/hk-lub-fail.scala
+++ b/test/pending/run/hk-lub-fail.scala
@@ -30,7 +30,7 @@ object Test {
val tps = List(quux1, quux2) map (_.tpe)
val test = EmptyPackageClass.tpe.member(newTermName("Test"))
val f = test.tpe.member(newTypeName("F")).tpe
-
+
val fn = f.normalize.asInstanceOf[ExistentialType]
val fn2 = fn.underlying.asInstanceOf[TypeRef]
*/
diff --git a/test/pending/run/instanceOfAndTypeMatching.scala b/test/pending/run/instanceOfAndTypeMatching.scala
index 60b11ef0c1..e04ae13585 100644
--- a/test/pending/run/instanceOfAndTypeMatching.scala
+++ b/test/pending/run/instanceOfAndTypeMatching.scala
@@ -6,9 +6,9 @@ object Summary {
class Inner { }
def f() = { class MethodInner ; new MethodInner }
}
-
+
// 1 static issue:
- //
+ //
// Given method in MethodInner: def g(other: MethodInner) = ()
// method1.g(method1) fails to compile with type error.
//
@@ -20,7 +20,7 @@ object Summary {
// traverse a method.
//
// 4 runtime issues:
- //
+ //
// From the outside: inner1.isInstanceOf[outer2.Inner] is true, should (maybe) be false
// From inside inner1: inner2.isInstanceOf[Outer.this.Inner] is true, should (maybe) be false
// From the outside: inner1 match { case _: outer2.Inner => true ... } is true, should definitely be false
@@ -44,13 +44,13 @@ class Outer {
def passInner(other: Inner) = () // pass only Inners from this Outer instance
def passInner2(other: Outer.this.Inner) = () // same as above
def passInnerSharp(other: Outer#Inner) = () // pass any Inner
-
+
def compareSimpleWithTypeMatch(other: Any) = other match {
case _: Inner => true
case _ => false
}
def compareSimpleWithInstanceOf(other: Any) = other.isInstanceOf[Inner]
-
+
def compareSharpWithTypeMatch(other: Any) = {
other match {
case _: Outer#Inner => true
@@ -58,16 +58,16 @@ class Outer {
}
}
def compareSharpWithInstanceOf(other: Any) = other.isInstanceOf[Outer#Inner]
-
+
def comparePathWithTypeMatch(other: Any) = other match {
case _: Outer.this.Inner => true
case _ => false
}
- def comparePathWithInstanceOf(other: Any) = other.isInstanceOf[Outer.this.Inner]
+ def comparePathWithInstanceOf(other: Any) = other.isInstanceOf[Outer.this.Inner]
}
-
+
def f() = {
- class MethodInner {
+ class MethodInner {
def passOuter(other: Outer) = () // pass any Outer
def passThisType(other: Outer.this.type) = () // pass only this Outer instance
def passInner(other: Inner) = () // pass only Inners from this Outer instance
@@ -75,14 +75,14 @@ class Outer {
def passInnerSharp(other: Outer#Inner) = () // pass any Inner
def passMethodInner(other: MethodInner) = () // pass only MethodInners from this Outer instance
// is there any way to refer to Outer#MethodInner? Not that there should be.
-
+
def compareWithInstanceOf(other: Any) = other.isInstanceOf[MethodInner]
def compareWithTypeMatch(other: Any) = other match {
case _: MethodInner => true
case _ => false
}
}
-
+
new MethodInner
}
}
@@ -94,7 +94,7 @@ object Test {
val inner2 = new outer2.Inner
val method1 = outer1.f()
val method2 = outer2.f()
-
+
def testInnerStatic = {
// these should all work
inner1.passOuter(outer1)
@@ -104,7 +104,7 @@ object Test {
inner1.passInner2(inner1)
inner1.passInnerSharp(inner1)
inner1.passInnerSharp(inner2)
-
+
// these should all fail to compile, and do
//
// inner1.passThisType(outer2)
@@ -113,30 +113,30 @@ object Test {
}
def testInnerRuntime = {
println("testInnerRuntime\n")
-
+
List("These should be true under any scenario: ",
- inner1.isInstanceOf[outer1.Inner] ,
+ inner1.isInstanceOf[outer1.Inner] ,
inner1.isInstanceOf[Outer#Inner] ,
(inner1: Any) match { case _: Outer#Inner => true ; case _ => false } ,
(inner1: Any) match { case _: outer1.Inner => true ; case _ => false } ,
inner1.compareSharpWithTypeMatch(inner2) ,
inner1.compareSharpWithInstanceOf(inner2)
) foreach println
-
+
List("These should be true under current proposal: ",
- inner1.compareSimpleWithInstanceOf(inner2)
+ inner1.compareSimpleWithInstanceOf(inner2)
) foreach println
-
+
List("These should be false under current proposal: ",
inner1.compareSimpleWithTypeMatch(inner2) ,
- inner1.comparePathWithTypeMatch(inner2)
+ inner1.comparePathWithTypeMatch(inner2)
) foreach println
-
- List("These return true but I think should return false: ",
+
+ List("These return true but I think should return false: ",
inner1.isInstanceOf[outer2.Inner] , // true
inner1.comparePathWithInstanceOf(inner2) // true
) foreach println
-
+
List("These are doing the wrong thing under current proposal",
(inner1: Any) match { case _: outer2.Inner => true ; case _ => false } // should be false
) foreach println
@@ -159,7 +159,7 @@ object Test {
// method1.passMethodInner(method1)
// ^
method1.passMethodInner(method1)
-
+
// these should all fail to compile, and do
//
// method1.passThisType(outer2)
@@ -167,24 +167,24 @@ object Test {
// method1.passInner2(inner2)
// method1.passMethodInner(method2)
}
-
+
def testMethodInnerRuntime = {
println("\ntestMethodInnerRuntime\n")
-
+
List("These should be true under any scenario: ",
method1.compareWithInstanceOf(method1) ,
- method1.compareWithTypeMatch(method1)
+ method1.compareWithTypeMatch(method1)
) foreach println
-
+
List("These should be true under current proposal: ",
method1.compareWithInstanceOf(method2)
) foreach println
-
+
List("These are doing the wrong thing under current proposal",
method1.compareWithTypeMatch(method2) // should be false
) foreach println
}
-
+
def main(args: Array[String]): Unit = {
testInnerRuntime
testMethodInnerRuntime
diff --git a/test/pending/run/sigtp.scala b/test/pending/run/sigtp.scala
index 3e162cfdba..f8e050dbdc 100644
--- a/test/pending/run/sigtp.scala
+++ b/test/pending/run/sigtp.scala
@@ -12,6 +12,6 @@ final class Bug[A, B](val key: A) extends BugBase[A, Bug[A, B]] {
object Test extends SigTest {
def main(args: Array[String]): Unit = {
show[BugBase[_, _]]()
- show[Bug[_, _]]()
+ show[Bug[_, _]]()
}
}
diff --git a/test/pending/run/string-reverse.scala b/test/pending/run/string-reverse.scala
index 51b16bcd6a..976a970dec 100644
--- a/test/pending/run/string-reverse.scala
+++ b/test/pending/run/string-reverse.scala
@@ -6,13 +6,13 @@ object Test {
val ys = "Les Misérables"
val xs2 = new StringBuilder(xs)
val ys2 = new StringBuilder(ys)
-
+
def main(args: Array[String]): Unit = {
val out = new java.io.PrintStream(System.out, true, "UTF-8")
-
+
out.println("Strings")
List(xs, xs.reverse, ys, ys.reverse) foreach (out println _)
-
+
out.println("StringBuilder")
out.println(xs2.toString)
out.println(xs2.reverseContents().toString)
diff --git a/test/pending/run/structural-types-vs-anon-classes.scala b/test/pending/run/structural-types-vs-anon-classes.scala
index cf68f831f5..23410e3955 100644
--- a/test/pending/run/structural-types-vs-anon-classes.scala
+++ b/test/pending/run/structural-types-vs-anon-classes.scala
@@ -3,14 +3,14 @@ object Test {
class Leg
class Tail
class Monkey(arms: List[Arm], legs :List[Leg], tail: Tail)
-
+
def makeAwesomeMonkey(arms: List[Arm], legs: List[Leg], tail: Tail) = {
object m extends Monkey(arms, legs, tail) {
def beAwesome () = "I can fly! I can fly!"
}
m
}
-
+
def main(args: Array[String]): Unit = {
println(makeAwesomeMonkey(Nil, Nil, new Tail) beAwesome)
}
diff --git a/test/pending/run/t0508x.scala b/test/pending/run/t0508x.scala
index 0c1ffde3ed..12d3d09711 100644
--- a/test/pending/run/t0508x.scala
+++ b/test/pending/run/t0508x.scala
@@ -4,12 +4,12 @@
};
def foo[A >: Nothing <: Any, B >: Nothing <: Any, C >: Nothing <: Any]
- (unapply1: (A) => Option[(B, C)], v: A): Unit =
+ (unapply1: (A) => Option[(B, C)], v: A): Unit =
unapply1.apply(v) match {
- case Some((fst @ _, snd @ _)) =>
+ case Some((fst @ _, snd @ _)) =>
scala.Predef.println(scala.Tuple2.apply[java.lang.String, java.lang.String]("first: ".+(fst), " second: ".+(snd)))
case _ => scala.Predef.println(":(")
- }
+ }
Test.this.foo[Test.Foo, String, Int]({
((eta$0$1: Test.Foo) => Test.this.Foo.unapply(eta$0$1))
}, Test.this.Foo.apply("this might be fun", 10));
diff --git a/test/pending/run/t1980.scala b/test/pending/run/t1980.scala
index 38353c6270..71c178d634 100644
--- a/test/pending/run/t1980.scala
+++ b/test/pending/run/t1980.scala
@@ -2,7 +2,7 @@
// Reported by: extempore Owned by: odersky
// Priority: normal Component: Compiler
// Keywords: Cc: paulp@…
-// Fixed in version:
+// Fixed in version:
// Description
scala> def foo() = { println("foo") ; 5 }
diff --git a/test/pending/run/t2318.scala b/test/pending/run/t2318.scala
index 7bb666706f..e42cbb9680 100644
--- a/test/pending/run/t2318.scala
+++ b/test/pending/run/t2318.scala
@@ -2,7 +2,7 @@ import java.security._
object Test {
trait Bar { def bar: Unit }
-
+
object Mgr extends SecurityManager {
override def checkPermission(perm: Permission) = perm match {
case _: java.lang.RuntimePermission => ()
@@ -11,11 +11,11 @@ object Test {
case _ => super.checkPermission(perm)
}
}
-
+
def t1() = {
val p = Runtime.getRuntime().exec("ls");
type Destroyable = { def destroy() : Unit }
- def doDestroy( obj : Destroyable ) : Unit = obj.destroy();
+ def doDestroy( obj : Destroyable ) : Unit = obj.destroy();
doDestroy( p );
}
def t2() = {
@@ -27,12 +27,12 @@ object Test {
val structural = b.asInstanceOf[{ def bar: Unit }]
structural.bar
}
-
+
def main(args: Array[String]) {
// figuring this will otherwise break on windows
try t1()
catch { case _: java.io.IOException => () }
-
+
t2()
}
}
diff --git a/test/pending/run/t3609.scala b/test/pending/run/t3609.scala
index 030b417044..eb25afd667 100755
--- a/test/pending/run/t3609.scala
+++ b/test/pending/run/t3609.scala
@@ -11,7 +11,7 @@ object Test extends Application {
}
// This code prints 1. If we remove comment, then it will print 4.
-// Moreover following code prints 3 (which is most strange thing):
+// Moreover following code prints 3 (which is most strange thing):
object Test2 extends Application {
class A
diff --git a/test/pending/run/t3669.scala b/test/pending/run/t3669.scala
index 4fd698c1a5..c60ba98538 100644
--- a/test/pending/run/t3669.scala
+++ b/test/pending/run/t3669.scala
@@ -1,5 +1,5 @@
trait MyTrait[T <: { var id: U }, U] {
- def test(t: T): T = {
+ def test(t: T): T = {
val v: U = t.id
t.id = v
t
diff --git a/test/pending/run/t3857.scala b/test/pending/run/t3857.scala
index 94f52f72fe..62bdc39da9 100644
--- a/test/pending/run/t3857.scala
+++ b/test/pending/run/t3857.scala
@@ -8,6 +8,6 @@ object Test extends SigTest {
def main(args: Array[String]): Unit = {
show[ScalaGeneric]()
show[ScalaGeneric2Trait]()
- show[ScalaGeneric2]()
+ show[ScalaGeneric2]()
}
}
diff --git a/test/pending/run/t4283/IllegalAccess.scala b/test/pending/run/t4283/IllegalAccess.scala
index 12de7e4649..33039c9350 100644
--- a/test/pending/run/t4283/IllegalAccess.scala
+++ b/test/pending/run/t4283/IllegalAccess.scala
@@ -2,7 +2,7 @@ package other
object IllegalAccess {
def main(args: Array[String]) {
- val x = (new test.ScalaBipp).make.get.asInstanceOf[test.ScalaBipp].f()
+ val x = (new test.ScalaBipp).make.get.asInstanceOf[test.ScalaBipp].f()
println(x)
val y = (new test.ScalaBipp).make.get.f()
println(y)