|
| 1 | +-- [E053] Type Error: tests/neg/type-params.scala:14:13 ---------------------------------------------------------------- |
| 2 | +14 | type t = x[x] // error |
| 3 | + | ^^^^ |
| 4 | + | x does not take type parameters |
| 5 | + | |
| 6 | + | longer explanation available when compiling with `-explain` |
| 7 | +-- [E053] Type Error: tests/neg/type-params.scala:16:13 ---------------------------------------------------------------- |
| 8 | +16 | val foo: s[Int] // error |
| 9 | + | ^^^^^^ |
| 10 | + | s does not take type parameters |
| 11 | + | |
| 12 | + | longer explanation available when compiling with `-explain` |
| 13 | +-- Error: tests/neg/type-params.scala:21:26 ---------------------------------------------------------------------------- |
| 14 | +21 | object mp extends Monad[Tuple2] // error |
| 15 | + | ^^^^^^ |
| 16 | + | Type argument [T1, T2] =>> (T1, T2) does not have the same kind as its bound [x] |
| 17 | +-- Error: tests/neg/type-params.scala:24:26 ---------------------------------------------------------------------------- |
| 18 | +24 | trait ms1 extends Monad[String] // error |
| 19 | + | ^^^^^^ |
| 20 | + | Type argument String does not have the same kind as its bound [x] |
| 21 | +-- Error: tests/neg/type-params.scala:25:29 ---------------------------------------------------------------------------- |
| 22 | +25 | trait ms2[t] extends Monad[t] // error |
| 23 | + | ^ |
| 24 | + | Type argument t does not have the same kind as its bound [x] |
| 25 | +-- Error: tests/neg/type-params.scala:26:35 ---------------------------------------------------------------------------- |
| 26 | +26 | trait ms3[m[_], t] extends Monad[m[t]] // error -- added to check regression on bug |
| 27 | + | ^^^^ |
| 28 | + | Type argument m[t] does not have the same kind as its bound [x] |
| 29 | +-- Error: tests/neg/type-params.scala:31:31 ---------------------------------------------------------------------------- |
| 30 | +31 | trait Bar2[m[_]] extends Foo[m] // error check that m is properly recognized as kind *->*, while * is expected |
| 31 | + | ^ |
| 32 | + | Type argument m does not have the same kind as its bound |
| 33 | +-- [E053] Type Error: tests/neg/type-params.scala:37:20 ---------------------------------------------------------------- |
| 34 | +37 |class t1701 extends java.lang.Cloneable[String, Option, Int] // error |
| 35 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 36 | + | Cloneable does not take type parameters |
| 37 | + | |
| 38 | + | longer explanation available when compiling with `-explain` |
| 39 | +-- [E053] Type Error: tests/neg/type-params.scala:39:24 ---------------------------------------------------------------- |
| 40 | +39 |trait t0842[T] { def m: this.type[T] = this } // error |
| 41 | + | ^^^^^^^^^^^^ |
| 42 | + | (t0842.this : t0842[T]) does not take type parameters |
| 43 | + | |
| 44 | + | longer explanation available when compiling with `-explain` |
| 45 | +-- [E134] Type Error: tests/neg/type-params.scala:45:10 ---------------------------------------------------------------- |
| 46 | +45 | println(a[A]) // error |
| 47 | + | ^ |
| 48 | + | None of the overloaded alternatives of method apply in trait Function1 with types |
| 49 | + | (v1: t278.this.A): Unit |
| 50 | + | (): Unit |
| 51 | + | match type arguments [t278.this.A] and expected type Any |
| 52 | +-- [E120] Naming Error: tests/neg/type-params.scala:44:6 --------------------------------------------------------------- |
| 53 | +44 | def a = (p: A) => () // error |
| 54 | + | ^ |
| 55 | + | Double definition: |
| 56 | + | def a: () => Unit in trait t278 at line 43 and |
| 57 | + | def a: t278.this.A => Unit in trait t278 at line 44 |
| 58 | + | have the same type after erasure. |
| 59 | + | |
| 60 | + | Consider adding a @targetName annotation to one of the conflicting definitions |
| 61 | + | for disambiguation. |
| 62 | +-- Error: tests/neg/type-params.scala:4:7 ------------------------------------------------------------------------------ |
| 63 | +4 | "".==[Int] // error |
| 64 | + | ^^^^^^^^^^ |
| 65 | + | method == in class Any does not take type parameters |
| 66 | +-- Error: tests/neg/type-params.scala:5:17 ----------------------------------------------------------------------------- |
| 67 | +5 | ("": AnyRef).==[Int] // error |
| 68 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 69 | + | method == in class Any does not take type parameters |
| 70 | +-- Error: tests/neg/type-params.scala:6:17 ----------------------------------------------------------------------------- |
| 71 | +6 | ("": Object).==[Int] // error |
| 72 | + | ^^^^^^^^^^^^^^^^^^^^ |
| 73 | + | method == in class Any does not take type parameters |
| 74 | +-- Error: tests/neg/type-params.scala:9:14 ----------------------------------------------------------------------------- |
| 75 | +9 | classOf[Int][Int] // error |
| 76 | + | ^^^^^^^^^^^^^^^^^ |
| 77 | + | illegal repeated type application |
| 78 | + | You might have meant something like: |
| 79 | + | classOf[Int, Int] |
| 80 | +-- [E140] Cyclic Error: tests/neg/type-params.scala:34:11 -------------------------------------------------------------- |
| 81 | +34 | def g[X, A[X] <: A[X]](x: A[X]) = x // error // error |
| 82 | + | ^ |
| 83 | + | illegal cyclic type reference: upper bound ... of type A refers back to the type itself |
| 84 | + | |
| 85 | + | Run with -explain-cyclic for more details. |
| 86 | +-- [E053] Type Error: tests/neg/type-params.scala:34:28 ---------------------------------------------------------------- |
| 87 | +34 | def g[X, A[X] <: A[X]](x: A[X]) = x // error // error |
| 88 | + | ^^^^ |
| 89 | + | A does not take type parameters |
| 90 | + | |
| 91 | + | longer explanation available when compiling with `-explain` |
| 92 | +-- [E140] Cyclic Error: tests/neg/type-params.scala:35:8 --------------------------------------------------------------- |
| 93 | +35 | def f[C[X] <: C[X]](l: C[_]) = l.x // error // error |
| 94 | + | ^ |
| 95 | + | illegal cyclic type reference: upper bound ... of type C refers back to the type itself |
| 96 | + | |
| 97 | + | Run with -explain-cyclic for more details. |
| 98 | +-- [E053] Type Error: tests/neg/type-params.scala:35:25 ---------------------------------------------------------------- |
| 99 | +35 | def f[C[X] <: C[X]](l: C[_]) = l.x // error // error |
| 100 | + | ^^^^ |
| 101 | + | C does not take type parameters |
| 102 | + | |
| 103 | + | longer explanation available when compiling with `-explain` |
0 commit comments