|
1 |
| --- Error: tests/neg/i17613b/i17613b.scala:9:13 ------------------------------------------------------------------------- |
2 |
| -9 | def foobar[ImTrait](in: D) = in.toString // error |
3 |
| - | ^^^^^^^ |
4 |
| - | Type parameter ImTrait for method foobar shadows the type defined by trait ImTrait in object importTry |
5 |
| --- Error: tests/neg/i17613b/i17613b.scala:10:13 ------------------------------------------------------------------------ |
6 |
| -10 | type MySeq[ImTrait] = Seq[D] // error |
| 1 | +-- Warning: tests/neg/i17613b/i17613b.scala:7:18 ----------------------------------------------------------------------- |
| 2 | +7 | trait Typeclass[T] |
| 3 | + | ^ |
| 4 | + | Type parameter T for trait Typeclass shadows the type defined by type T in class B |
| 5 | +-- Warning: tests/neg/i17613b/i17613b.scala:10:13 ---------------------------------------------------------------------- |
| 6 | +10 | def foobar[ImTrait](in: D) = in.toString // warn |
| 7 | + | ^^^^^^^ |
| 8 | + | Type parameter ImTrait for method foobar shadows the type defined by trait ImTrait in object importTry |
| 9 | +-- Warning: tests/neg/i17613b/i17613b.scala:11:13 ---------------------------------------------------------------------- |
| 10 | +11 | type MySeq[ImTrait] = Seq[D] // warn |
7 | 11 | | ^^^^^^^
|
8 | 12 | | Type parameter ImTrait for type MySeq shadows the type defined by trait ImTrait in object importTry
|
9 |
| --- Error: tests/neg/i17613b/i17613b.scala:12:14 ------------------------------------------------------------------------ |
10 |
| -12 | def foobar2[ImClass](in: D) = in.toString // error |
| 13 | +-- Warning: tests/neg/i17613b/i17613b.scala:13:14 ---------------------------------------------------------------------- |
| 14 | +13 | def foobar2[ImClass](in: D) = in.toString // warn |
11 | 15 | | ^^^^^^^
|
12 | 16 | | Type parameter ImClass for method foobar2 shadows the type defined by class ImClass in object importTry
|
13 |
| --- Error: tests/neg/i17613b/i17613b.scala:13:14 ------------------------------------------------------------------------ |
14 |
| -13 | type MySeq2[ImClass] = Seq[D] // error |
| 17 | +-- Warning: tests/neg/i17613b/i17613b.scala:14:14 ---------------------------------------------------------------------- |
| 18 | +14 | type MySeq2[ImClass] = Seq[D] // warn |
15 | 19 | | ^^^^^^^
|
16 | 20 | | Type parameter ImClass for type MySeq2 shadows the type defined by class ImClass in object importTry
|
17 |
| --- Error: tests/neg/i17613b/i17613b.scala:16:24 ------------------------------------------------------------------------ |
18 |
| -16 | type TypeLambda[A] = [ImTrait] =>> Map[ImTrait, B] // error |
| 21 | +-- Warning: tests/neg/i17613b/i17613b.scala:17:24 ---------------------------------------------------------------------- |
| 22 | +17 | type TypeLambda[A] = [ImTrait] =>> Map[ImTrait, B] |
19 | 23 | | ^^^^^^^
|
20 | 24 | | Type parameter ImTrait for type TypeLambda shadows the type defined by trait ImTrait in object importTry
|
21 |
| --- Error: tests/neg/i17613b/i17613b.scala:17:21 ------------------------------------------------------------------------ |
22 |
| -17 | type PolyFun[A] = [ImTrait] => ImTrait => B // error |
| 25 | +-- Warning: tests/neg/i17613b/i17613b.scala:18:21 ---------------------------------------------------------------------- |
| 26 | +18 | type PolyFun[A] = [ImTrait] => ImTrait => B // warn |
23 | 27 | | ^^^^^^^
|
24 | 28 | | Type parameter ImTrait for type PolyFun shadows the type defined by trait ImTrait in object importTry
|
25 |
| --- Error: tests/neg/i17613b/i17613b.scala:23:12 ------------------------------------------------------------------------ |
26 |
| -23 | class Foo[T](t: T): // error class parameter shadows some other type |
| 29 | +-- Warning: tests/neg/i17613b/i17613b.scala:24:12 ---------------------------------------------------------------------- |
| 30 | +24 | class Foo[T](t: T): // warn class parameter shadows some other type |
27 | 31 | | ^
|
28 | 32 | | Type parameter T for class Foo shadows the type defined by type T in class B
|
29 |
| --- Error: tests/neg/i17613b/i17613b.scala:27:15 ------------------------------------------------------------------------ |
30 |
| -27 | def intType[List1](x: T) = x.toString() // error |
| 33 | +-- Warning: tests/neg/i17613b/i17613b.scala:28:15 ---------------------------------------------------------------------- |
| 34 | +28 | def intType[List1](x: T) = x.toString() // warn |
31 | 35 | | ^^^^^
|
32 | 36 | | Type parameter List1 for method intType shadows an explicitly renamed type : List1
|
33 |
| --- Error: tests/neg/i17613b/i17613b.scala:32:10 ------------------------------------------------------------------------ |
34 |
| -32 | given [Int]: Ordering[Int]() // error |
| 37 | +-- Warning: tests/neg/i17613b/i17613b.scala:33:10 ---------------------------------------------------------------------- |
| 38 | +33 | given [Int]: Typeclass[Int]() // warn |
35 | 39 | | ^^^
|
36 |
| - | Type parameter Int for method given_Ordering_Int shadows the type defined by class Int in package scala |
37 |
| --- Error: tests/neg/i17613b/i17613b.scala:34:12 ------------------------------------------------------------------------ |
38 |
| -34 | class C[M[List[_]]] // error List not renamed here |
| 40 | + | Type parameter Int for method given_Typeclass_Int shadows the type defined by class Int in package scala |
| 41 | +-- Warning: tests/neg/i17613b/i17613b.scala:35:12 ---------------------------------------------------------------------- |
| 42 | +35 | class C[M[List[_]]] // warn List not renamed here |
39 | 43 | | ^^^^^^^
|
40 | 44 | | Type parameter List for class C shadows the type defined by type List in package scala
|
41 |
| --- Error: tests/neg/i17613b/i17613b.scala:35:11 ------------------------------------------------------------------------ |
42 |
| -35 | type E[M[Int[_]]] = Int // error |
| 45 | +-- Warning: tests/neg/i17613b/i17613b.scala:36:11 ---------------------------------------------------------------------- |
| 46 | +36 | type E[M[Int[_]]] = Int // warn |
43 | 47 | | ^^^^^^
|
44 | 48 | | Type parameter Int for type E shadows the type defined by class Int in package scala
|
45 |
| --- Error: tests/neg/i17613b/i17613b.scala:37:14 ------------------------------------------------------------------------ |
46 |
| -37 | def foo[N[M[List[_]]]] = // error |
| 49 | +-- Warning: tests/neg/i17613b/i17613b.scala:38:14 ---------------------------------------------------------------------- |
| 50 | +38 | def foo[N[M[List[_]]]] = // warn |
47 | 51 | | ^^^^^^^
|
48 | 52 | | Type parameter List for method foo shadows the type defined by type List in package scala
|
49 |
| --- Error: tests/neg/i17613b/i17613b.scala:40:11 ------------------------------------------------------------------------ |
50 |
| -40 | type Z[ImClassR] = Int // error |
| 53 | +-- Warning: tests/neg/i17613b/i17613b.scala:41:11 ---------------------------------------------------------------------- |
| 54 | +41 | type Z[ImClassR] = Int // warn |
51 | 55 | | ^^^^^^^^
|
52 | 56 | | Type parameter ImClassR for type Z shadows an explicitly renamed type : ImClassR
|
53 |
| --- Error: tests/neg/i17613b/i17613b.scala:41:18 ------------------------------------------------------------------------ |
54 |
| -41 | class InnerCl[ImClassR] // error |
| 57 | +-- Warning: tests/neg/i17613b/i17613b.scala:42:18 ---------------------------------------------------------------------- |
| 58 | +42 | class InnerCl[ImClassR] // warn |
55 | 59 | | ^^^^^^^^
|
56 | 60 | | Type parameter ImClassR for class InnerCl shadows an explicitly renamed type : ImClassR
|
| 61 | +No warnings can be incurred under -Werror. |
0 commit comments