From d89ea1c9a5de945ca8f108bee8f174d6dcc2f7e8 Mon Sep 17 00:00:00 2001 From: Iulian Dragos Date: Wed, 11 Jun 2008 11:34:30 +0000 Subject: Moved pending tests that succeed to their place... Moved pending tests that succeed to their place in the 'files' directory. --- test/files/pos/bug0646.scala | 21 +++++++++++++++++++++ test/files/pos/bug112606A.scala | 25 +++++++++++++++++++++++++ test/files/pos/t0654.scala | 5 +++++ test/files/pos/t0710.scala | 10 ++++++++++ test/files/pos/t0999.scala | 5 +++++ 5 files changed, 66 insertions(+) create mode 100644 test/files/pos/bug0646.scala create mode 100644 test/files/pos/bug112606A.scala create mode 100644 test/files/pos/t0654.scala create mode 100644 test/files/pos/t0710.scala create mode 100644 test/files/pos/t0999.scala (limited to 'test/files/pos') diff --git a/test/files/pos/bug0646.scala b/test/files/pos/bug0646.scala new file mode 100644 index 0000000000..64214f65b1 --- /dev/null +++ b/test/files/pos/bug0646.scala @@ -0,0 +1,21 @@ +object xfor { + + import scala.xml.NodeSeq + + val books = + + Blabla + Blubabla + Baaaaaaalabla + ; + + new NodeSeq { val theSeq = books.child } match { + case t @ Blabla => t + } + + //val n: NodeSeq = new NodeSeq { val theSeq = books.child } + //n match { + // case t @ Blabla => t + //} + +} diff --git a/test/files/pos/bug112606A.scala b/test/files/pos/bug112606A.scala new file mode 100644 index 0000000000..5bf532f8dd --- /dev/null +++ b/test/files/pos/bug112606A.scala @@ -0,0 +1,25 @@ +package test; +trait Test { + trait Global { + type Tree; + def get : Tree; + } + trait TreeBuilder { + val global : Global; + def set(tree : global.Tree) = {} + } + val nsc : Global; + trait FileImpl { + object treeBuilder extends TreeBuilder { + val global : nsc.type = nsc; + } + // ok + treeBuilder.set(nsc.get); + } + val file0 : FileImpl; + // ok + file0.treeBuilder.set(nsc.get); + def file : FileImpl; + // type mismatch + file.treeBuilder.set(nsc.get); +} diff --git a/test/files/pos/t0654.scala b/test/files/pos/t0654.scala new file mode 100644 index 0000000000..07b4e72794 --- /dev/null +++ b/test/files/pos/t0654.scala @@ -0,0 +1,5 @@ +object Test { + class Foo[T] + type C[T] = Foo[_ <: T] + val a: C[AnyRef] = new Foo[AnyRef] +} diff --git a/test/files/pos/t0710.scala b/test/files/pos/t0710.scala new file mode 100644 index 0000000000..4512a101d9 --- /dev/null +++ b/test/files/pos/t0710.scala @@ -0,0 +1,10 @@ +object t0710 { + def method { + sealed case class Parent + case object Child extends Parent + val x: Parent = Child + x match { + case Child => () + } + } +} diff --git a/test/files/pos/t0999.scala b/test/files/pos/t0999.scala new file mode 100644 index 0000000000..c384820af1 --- /dev/null +++ b/test/files/pos/t0999.scala @@ -0,0 +1,5 @@ +object A { + val d: Double = Math.sqrt(5 match { + case x: Double => x + }) +} -- cgit v1.2.3