diff options
author | Martin Odersky <odersky@gmail.com> | 2015-10-21 16:56:05 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-10-22 12:21:25 +0200 |
commit | 3da5e04e286ee74781fda9e3b8776e5a8644712a (patch) | |
tree | e16bd67fd3dc049f407f4b0ffcf5830fd861c952 /tests | |
parent | 9ad85c31640d8cf3b97db51f5520c1ca63e3e31c (diff) | |
download | dotty-3da5e04e286ee74781fda9e3b8776e5a8644712a.tar.gz dotty-3da5e04e286ee74781fda9e3b8776e5a8644712a.tar.bz2 dotty-3da5e04e286ee74781fda9e3b8776e5a8644712a.zip |
Fix tests to survive wellformedness checks
Diffstat (limited to 'tests')
-rw-r--r-- | tests/neg/i50-volatile.scala | 2 | ||||
-rw-r--r-- | tests/neg/singletons.scala | 2 | ||||
-rw-r--r-- | tests/neg/typers.scala | 2 | ||||
-rw-r--r-- | tests/pos/i566.scala | 2 | ||||
-rw-r--r-- | tests/pos/tycons.scala | 2 | ||||
-rw-r--r-- | tests/run/classTags.scala | 5 |
6 files changed, 7 insertions, 8 deletions
diff --git a/tests/neg/i50-volatile.scala b/tests/neg/i50-volatile.scala index ae31a764c..9098b47d6 100644 --- a/tests/neg/i50-volatile.scala +++ b/tests/neg/i50-volatile.scala @@ -1,4 +1,4 @@ -object Test { +class Test { class Base { class Inner } diff --git a/tests/neg/singletons.scala b/tests/neg/singletons.scala index 5dff13096..2155bfe31 100644 --- a/tests/neg/singletons.scala +++ b/tests/neg/singletons.scala @@ -5,7 +5,7 @@ object Test { val n: null = null // error: Null is not a legal singleton type - val sym: 'sym = 'sym // error: Symbol is a legal singleton type + val sym: 'sym = 'sym // error: Symbol is not a legal singleton type val foo: s"abc" = "abc" // error: not a legal singleton type } diff --git a/tests/neg/typers.scala b/tests/neg/typers.scala index 8bd39a557..537c4cdb0 100644 --- a/tests/neg/typers.scala +++ b/tests/neg/typers.scala @@ -30,7 +30,7 @@ object typers { } type L[X] = scala.collection.immutable.List[X] - type M[X, Y] <: scala.collection.immutable.Map[X, Y] + type M[X, Y] <: scala.collection.immutable.Map[X, Y] // error: only classes can have declared but undefined members object hk { def f(x: L) // error: missing type parameter diff --git a/tests/pos/i566.scala b/tests/pos/i566.scala index 34d25f8f2..a0e6f2fe7 100644 --- a/tests/pos/i566.scala +++ b/tests/pos/i566.scala @@ -1,4 +1,4 @@ -object Test { +class Test { type T = String type U reflect.classTag[T] diff --git a/tests/pos/tycons.scala b/tests/pos/tycons.scala index ef16a7792..1ed4d2855 100644 --- a/tests/pos/tycons.scala +++ b/tests/pos/tycons.scala @@ -16,7 +16,7 @@ abstract class Functor[F <: TypeConstructor] { def map[A, B](f: F { type TypeArg <: A }): F { type TypeArg <: B } } -implicit object ListFunctor extends Functor[List] { +object ListFunctor extends Functor[List] { override def map[A, B](f: List { type TypeArg <: A }): List { type TypeArg <: B } = ??? } diff --git a/tests/run/classTags.scala b/tests/run/classTags.scala index 9af6747f3..d0bd1c0ee 100644 --- a/tests/run/classTags.scala +++ b/tests/run/classTags.scala @@ -1,6 +1,5 @@ -object Test { +object Test { type T = String - type U /* val a /* : Class[T] */ = classOf[T] // [Ljava/lang/String; println(a) @@ -14,7 +13,7 @@ object Test { val f /* : ClassTag[Array[T with U]] */ = reflect.classTag[Array[T with U]] // ClassTag(arrayClass(classOf[java.lang.String])) println(f) val g /* : Class[Meter] */ = classOf[Meter] // [LMeter; - println(g) + println(g) val h /* : ClassTag[Meter] */ = reflect.classTag[Meter] // ClassTag(classOf[Meter]) println(h) */ |