diff options
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/neg/t1557.scala | 18 | ||||
-rw-r--r-- | test/pending/pos/t5685.scala | 23 | ||||
-rw-r--r-- | test/pending/pos/t5685b.scala | 23 | ||||
-rw-r--r-- | test/pending/pos/t5712.scala | 14 | ||||
-rw-r--r-- | test/pending/presentation/t5708.check | 81 | ||||
-rw-r--r-- | test/pending/presentation/t5708/Test.scala | 5 | ||||
-rw-r--r-- | test/pending/presentation/t5708/src/Completions.scala | 11 | ||||
-rw-r--r-- | test/pending/run/t5018.scala | 34 | ||||
-rw-r--r-- | test/pending/run/t5514.scala | 35 | ||||
-rw-r--r-- | test/pending/run/t5695.check | 2 | ||||
-rw-r--r-- | test/pending/run/t5695/part_1.scala | 12 | ||||
-rw-r--r-- | test/pending/run/t5695/part_2.scala | 8 |
12 files changed, 151 insertions, 115 deletions
diff --git a/test/pending/neg/t1557.scala b/test/pending/neg/t1557.scala new file mode 100644 index 0000000000..ba93b45fad --- /dev/null +++ b/test/pending/neg/t1557.scala @@ -0,0 +1,18 @@ +object Test extends App { + trait A + trait B extends A + + trait C { + trait D { type T >: B <: A } + val y: (D with this.type)#T = new B { } + } + + class D extends C { + trait E + type T = E + def frob(arg : E) : E = arg + frob(y) + } + + new D +}
\ No newline at end of file diff --git a/test/pending/pos/t5685.scala b/test/pending/pos/t5685.scala deleted file mode 100644 index 9ac42a174e..0000000000 --- a/test/pending/pos/t5685.scala +++ /dev/null @@ -1,23 +0,0 @@ -trait X[A] { - def x: A -} - -trait XPrint[A] extends X[A] { - abstract override def x: A = { - val a = super.x - println(a) - a - } -} - -trait F[A, B] { outer => - def apply(xv: X[A]): X[B] - - def andThen[C](f: F[B, C]): F[A, C] = new F[A, C] { - def apply(xv: X[A]): X[C] = f(new XX(xv) with XPrint[B]) - } - - class XX(xv: X[A]) extends X[B] { - def x = outer(xv).x - } -} diff --git a/test/pending/pos/t5685b.scala b/test/pending/pos/t5685b.scala deleted file mode 100644 index 18ff803f89..0000000000 --- a/test/pending/pos/t5685b.scala +++ /dev/null @@ -1,23 +0,0 @@ -trait X[+A] { - def x: A -} - -trait XPrint[+A] extends X[A] { - abstract override def x: A = { - val a = super.x - println(a) - a - } -} - -trait F[-A, +B] { outer => - def apply(xv: X[A]): X[B] - - def andThen[C](f: F[B, C]): F[A, C] = new F[A, C] { - def apply(xv: X[A]): X[C] = f(new XX(xv) with XPrint[B]) - } - - class XX(xv: X[A]) extends X[B] { - def x = outer(xv).x - } -} diff --git a/test/pending/pos/t5712.scala b/test/pending/pos/t5712.scala new file mode 100644 index 0000000000..31f365028a --- /dev/null +++ b/test/pending/pos/t5712.scala @@ -0,0 +1,14 @@ +import scala.tools.nsc._ + +object Test { + + // works + def mkReifier(global: Global)(typer: global.analyzer.Typer) = typer + +/* +<console>:10: error: not found: value global + class Reifier(global: Global)(typer: global.analyzer.Typer) { } +*/ + class Reifier(global: Global)(typer: global.analyzer.Typer) { } + +} diff --git a/test/pending/presentation/t5708.check b/test/pending/presentation/t5708.check new file mode 100644 index 0000000000..9d944d6cfc --- /dev/null +++ b/test/pending/presentation/t5708.check @@ -0,0 +1,81 @@ +reload: Completions.scala + +askTypeCompletion at Completions.scala(9,9) +================================================================================ +[response] aksTypeCompletion at (9,9) +retrieved 38 members +[accessible: true] `method !=(x$1: Any)Boolean` +[accessible: true] `method !=(x$1: AnyRef)Boolean` +[accessible: true] `method ##()Int` +[accessible: true] `method +(other: String)String` +[accessible: true] `method ->[B](y: B)(test.Compat.type, B)` +[accessible: true] `method ==(x$1: Any)Boolean` +[accessible: true] `method ==(x$1: AnyRef)Boolean` +[accessible: true] `method asInstanceOf[T0]=> T0` +[accessible: true] `method ensuring(cond: Boolean)test.Compat.type` +[accessible: true] `method ensuring(cond: Boolean, msg: => Any)test.Compat.type` +[accessible: true] `method ensuring(cond: test.Compat.type => Boolean)test.Compat.type` +[accessible: true] `method ensuring(cond: test.Compat.type => Boolean, msg: => Any)test.Compat.type` +[accessible: true] `method eq(x$1: AnyRef)Boolean` +[accessible: true] `method equals(x$1: Any)Boolean` +[accessible: true] `method formatted(fmtstr: String)String` +[accessible: true] `method hashCode()Int` +[accessible: true] `method isInstanceOf[T0]=> Boolean` +[accessible: true] `method ne(x$1: AnyRef)Boolean` +[accessible: true] `method notify()Unit` +[accessible: true] `method notifyAll()Unit` +[accessible: true] `method synchronized[T0](x$1: T0)T0` +[accessible: true] `method toString()String` +[accessible: true] `method wait()Unit` +[accessible: true] `method wait(x$1: Long)Unit` +[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` +[accessible: true] `method x=> test.Compat.type` +[accessible: true] `method →[B](y: B)(test.Compat.type, B)` +[accessible: true] `lazy value fooInt` +[accessible: false] `method clone()Object` +[accessible: false] `method finalize()Unit` +[accessible: true] `value CONST_STRINGString("constant")` +[accessible: false] `value __leftOfArrowtest.Compat.type` +[accessible: false] `value __resultOfEnsuringtest.Compat.type` +[accessible: false] `value selfAny` +================================================================================ + +askTypeCompletion at Completions.scala(10,9) +================================================================================ +[response] aksTypeCompletion at (10,9) +retrieved 38 members +[accessible: true] `method !=(x$1: Any)Boolean` +[accessible: true] `method !=(x$1: AnyRef)Boolean` +[accessible: true] `method ##()Int` +[accessible: true] `method +(other: String)String` +[accessible: true] `method ->[B](y: B)(test.Compat.type, B)` +[accessible: true] `method ==(x$1: Any)Boolean` +[accessible: true] `method ==(x$1: AnyRef)Boolean` +[accessible: true] `method asInstanceOf[T0]=> T0` +[accessible: true] `method ensuring(cond: Boolean)test.Compat.type` +[accessible: true] `method ensuring(cond: Boolean, msg: => Any)test.Compat.type` +[accessible: true] `method ensuring(cond: test.Compat.type => Boolean)test.Compat.type` +[accessible: true] `method ensuring(cond: test.Compat.type => Boolean, msg: => Any)test.Compat.type` +[accessible: true] `method eq(x$1: AnyRef)Boolean` +[accessible: true] `method equals(x$1: Any)Boolean` +[accessible: true] `method formatted(fmtstr: String)String` +[accessible: true] `method hashCode()Int` +[accessible: true] `method isInstanceOf[T0]=> Boolean` +[accessible: true] `method ne(x$1: AnyRef)Boolean` +[accessible: true] `method notify()Unit` +[accessible: true] `method notifyAll()Unit` +[accessible: true] `method synchronized[T0](x$1: T0)T0` +[accessible: true] `method toString()String` +[accessible: true] `method wait()Unit` +[accessible: true] `method wait(x$1: Long)Unit` +[accessible: true] `method wait(x$1: Long, x$2: Int)Unit` +[accessible: true] `method x=> test.Compat.type` +[accessible: true] `method →[B](y: B)(test.Compat.type, B)` +[accessible: true] `lazy value fooInt` +[accessible: false] `method clone()Object` +[accessible: false] `method finalize()Unit` +[accessible: true] `value CONST_STRINGString("constant")` +[accessible: false] `value __leftOfArrowtest.Compat.type` +[accessible: false] `value __resultOfEnsuringtest.Compat.type` +[accessible: false] `value selfAny` +================================================================================ diff --git a/test/pending/presentation/t5708/Test.scala b/test/pending/presentation/t5708/Test.scala new file mode 100644 index 0000000000..96e758d974 --- /dev/null +++ b/test/pending/presentation/t5708/Test.scala @@ -0,0 +1,5 @@ +import scala.tools.nsc.interactive.tests.InteractiveTest + +object Test extends InteractiveTest { + +}
\ No newline at end of file diff --git a/test/pending/presentation/t5708/src/Completions.scala b/test/pending/presentation/t5708/src/Completions.scala new file mode 100644 index 0000000000..cc41492df7 --- /dev/null +++ b/test/pending/presentation/t5708/src/Completions.scala @@ -0,0 +1,11 @@ +package test + +object Compat { + final val CONST_STRING = "constant" + lazy val foo = 4 +} + +class Foo { + Compat./*!*/CONST_STRING // its 'accessible' flag is false + Compat./*!*/foo // its 'accessible' flag is false +} diff --git a/test/pending/run/t5018.scala b/test/pending/run/t5018.scala deleted file mode 100644 index 30c0d5ac94..0000000000 --- a/test/pending/run/t5018.scala +++ /dev/null @@ -1,34 +0,0 @@ - - - -import java.io._ -import collection._ - - - -object Test { - - def serializeDeserialize[T <: AnyRef](obj: T) = { - val buffer = new ByteArrayOutputStream - val out = new ObjectOutputStream(buffer) - out.writeObject(obj) - val in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray)) - in.readObject.asInstanceOf[T] - } - - def main(args: Array[String]) { - val values = mutable.Map(1 -> 1).values - assert(serializeDeserialize(values) == values) - - val keyset = mutable.Map(1 -> 1).keySet - assert(serializeDeserialize(keyset) == keyset) - - val imkeyset = immutable.Map(1 -> 1).keySet - assert(serializeDeserialize(imkeyset) == imkeyset) - - val defaultmap = immutable.Map(1 -> 1).withDefaultValue(1) - assert(serializeDeserialize(defaultmap) == defaultmap) - } - -} - diff --git a/test/pending/run/t5514.scala b/test/pending/run/t5514.scala deleted file mode 100644 index eacad21cd8..0000000000 --- a/test/pending/run/t5514.scala +++ /dev/null @@ -1,35 +0,0 @@ - - - -import scala.io.Source -import scala.util.parsing.combinator.Parsers -import scala.util.parsing.input.Reader -import scala.util.parsing.input.Position - - - -object DemoApp extends App { - val parsers = new DemoParsers - val reader = new DemoReader(10) - val result = parsers.startsWith("s").*(reader) - Console println result -} - - -class DemoReader(n: Int) extends Reader[String] { - def atEnd = n == 0 - def first = "s" + n - def rest = new DemoReader(n - 1) - def pos = new Position { - def line = 0 - def column = 0 - def lineContents = first - } - println("reader: " + n) -} - - -class DemoParsers extends Parsers { - type Elem = String - def startsWith(prefix: String) = acceptIf(_ startsWith prefix)("Error: " + _) -} diff --git a/test/pending/run/t5695.check b/test/pending/run/t5695.check new file mode 100644 index 0000000000..d50069ab4f --- /dev/null +++ b/test/pending/run/t5695.check @@ -0,0 +1,2 @@ +.. +.. diff --git a/test/pending/run/t5695/part_1.scala b/test/pending/run/t5695/part_1.scala new file mode 100644 index 0000000000..b8e8f8e52f --- /dev/null +++ b/test/pending/run/t5695/part_1.scala @@ -0,0 +1,12 @@ +import language.experimental.macros +import scala.reflect.makro.Context + +object Defs { + + def mkInt = macro mkIntImpl + def mkIntImpl(c: Context): c.Expr[Any] = { + println(c.enclosingApplication) + c.reify{ 23 } + } + +} diff --git a/test/pending/run/t5695/part_2.scala b/test/pending/run/t5695/part_2.scala new file mode 100644 index 0000000000..d34219437d --- /dev/null +++ b/test/pending/run/t5695/part_2.scala @@ -0,0 +1,8 @@ +import Defs._ + +object Test extends App { + + val i1 = mkInt + val i2 = identity(mkInt) + +} |