diff options
author | Martin Odersky <odersky@gmail.com> | 2006-07-11 13:17:46 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2006-07-11 13:17:46 +0000 |
commit | 7632879f2c853cfa3efe05db8560fc605c595907 (patch) | |
tree | beced6caeeb8d9821921cf514648e3632079814f | |
parent | 9a39e68be1dfeaaa3382b8ee816d96a0a5f71cf4 (diff) | |
download | scala-7632879f2c853cfa3efe05db8560fc605c595907.tar.gz scala-7632879f2c853cfa3efe05db8560fc605c595907.tar.bz2 scala-7632879f2c853cfa3efe05db8560fc605c595907.zip |
added tests for bug650, bug651
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/Flatten.scala | 1 | ||||
-rw-r--r-- | test/files/neg/bug650.check | 4 | ||||
-rw-r--r-- | test/files/neg/bug650.scala | 4 | ||||
-rw-r--r-- | test/files/pos/bug651.scala | 15 |
4 files changed, 23 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/Flatten.scala b/src/compiler/scala/tools/nsc/transform/Flatten.scala index f3aaadca45..38fb1d0493 100644 --- a/src/compiler/scala/tools/nsc/transform/Flatten.scala +++ b/src/compiler/scala/tools/nsc/transform/Flatten.scala @@ -97,7 +97,6 @@ abstract class Flatten extends InfoTransform { case _ => tree } - assert(tree1.tpe != null, tree1)// debug tree1 setType flattened(tree1.tpe) } diff --git a/test/files/neg/bug650.check b/test/files/neg/bug650.check new file mode 100644 index 0000000000..3f491f7a21 --- /dev/null +++ b/test/files/neg/bug650.check @@ -0,0 +1,4 @@ +bug650.scala:4 error: missing type arguments +trait Test2 extends LinkedList; + ^ +one error found diff --git a/test/files/neg/bug650.scala b/test/files/neg/bug650.scala new file mode 100644 index 0000000000..cdb4b3da47 --- /dev/null +++ b/test/files/neg/bug650.scala @@ -0,0 +1,4 @@ +// test/Test2.scala +package test; +import scala.collection.mutable._; +trait Test2 extends LinkedList; diff --git a/test/files/pos/bug651.scala b/test/files/pos/bug651.scala new file mode 100644 index 0000000000..c146446af9 --- /dev/null +++ b/test/files/pos/bug651.scala @@ -0,0 +1,15 @@ +package test; + +trait Test3 { + trait MatchableImpl { + trait MatchImpl; + } + + trait BracePairImpl { + trait BraceImpl extends MatchableImpl { + private object MyMatch1 extends MatchImpl; + protected def match0 : MatchImpl = MyMatch1; + + } + } +} |