diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-12 18:30:53 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-12 18:30:53 +0200 |
commit | 89bacb9c25a58454ff1878e67f7ea07ffc8c269f (patch) | |
tree | 51f1ff6c66aebe1b6109b1cffcc2bb8e4cf760a3 /tests/pending/run/t7319.check | |
parent | a0fa33deafbea1bf53edc068c5ed9db5592822f9 (diff) | |
download | dotty-89bacb9c25a58454ff1878e67f7ea07ffc8c269f.tar.gz dotty-89bacb9c25a58454ff1878e67f7ea07ffc8c269f.tar.bz2 dotty-89bacb9c25a58454ff1878e67f7ea07ffc8c269f.zip |
Run tests as they were in scala.
Diffstat (limited to 'tests/pending/run/t7319.check')
-rw-r--r-- | tests/pending/run/t7319.check | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/pending/run/t7319.check b/tests/pending/run/t7319.check new file mode 100644 index 000000000..e35cfc90c --- /dev/null +++ b/tests/pending/run/t7319.check @@ -0,0 +1,43 @@ +Type in expressions to have them evaluated. +Type :help for more information. + +scala> class M[A] +defined class M + +scala> implicit def ma0[A](a: A): M[A] = null +warning: there was one feature warning; re-run with -feature for details +ma0: [A](a: A)M[A] + +scala> implicit def ma1[A](a: A): M[A] = null +warning: there was one feature warning; re-run with -feature for details +ma1: [A](a: A)M[A] + +scala> def convert[F[X <: F[X]]](builder: F[_ <: F[_]]) = 0 +warning: there was one feature warning; re-run with -feature for details +convert: [F[X <: F[X]]](builder: F[_ <: F[_]])Int + +scala> convert(Some[Int](0)) +<console>:12: error: no type parameters for method convert: (builder: F[_ <: F[_]])Int exist so that it can be applied to arguments (Some[Int]) + --- because --- +argument expression's type is not compatible with formal parameter type; + found : Some[Int] + required: ?F[_$1] forSome { type _$1 <: ?F[_$2] forSome { type _$2 } } + convert(Some[Int](0)) + ^ +<console>:12: error: type mismatch; + found : Some[Int] + required: F[_ <: F[_]] + convert(Some[Int](0)) + ^ + +scala> Range(1,2).toArray: Seq[_] +<console>:11: error: polymorphic expression cannot be instantiated to expected type; + found : [B >: Int]Array[B] + required: Seq[_] + Range(1,2).toArray: Seq[_] + ^ + +scala> 0 +res2: Int = 0 + +scala> :quit |