-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
51 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,32 @@ | ||
-- Warning: tests/neg/i17612b/i17612b.scala:21:15 ---------------------------------------------------------------------- | ||
21 | class Derived(x : Int, x3: Int, y: Int, z2: Int) extends BaseB, BaseC(x3), Base(x, y + 1, z2): // warn // warn / for x, y translated to private[this] x field & shadowing var Base.x, Base.y | ||
-- Error: tests/neg/i17612b/i17612b.scala:21:15 ------------------------------------------------------------------------ | ||
21 | class Derived(x : Int, x3: Int, y: Int, z2: Int) extends BaseB, BaseC(x3), Base(x, y + 1, z2): // error // error / for x, y translated to private[this] x field & shadowing var Base.x, Base.y | ||
| ^ | ||
| value x in class Derived shadows field x inherited from trait Base | ||
-- Warning: tests/neg/i17612b/i17612b.scala:21:33 ---------------------------------------------------------------------- | ||
21 | class Derived(x : Int, x3: Int, y: Int, z2: Int) extends BaseB, BaseC(x3), Base(x, y + 1, z2): // warn // warn / for x, y translated to private[this] x field & shadowing var Base.x, Base.y | ||
-- Error: tests/neg/i17612b/i17612b.scala:21:33 ------------------------------------------------------------------------ | ||
21 | class Derived(x : Int, x3: Int, y: Int, z2: Int) extends BaseB, BaseC(x3), Base(x, y + 1, z2): // error // error / for x, y translated to private[this] x field & shadowing var Base.x, Base.y | ||
| ^ | ||
| value y in class Derived shadows field y inherited from trait Base | ||
-- Warning: tests/neg/i17612b/i17612b.scala:23:2 ----------------------------------------------------------------------- | ||
23 | private val shadowed2 = 2 + 2 // warn (In Scala 2 we cannot do that got the warning) | ||
-- Error: tests/neg/i17612b/i17612b.scala:23:2 ------------------------------------------------------------------------- | ||
23 | private val shadowed2 = 2 + 2 // error (In Scala 2 we cannot do that got the warning) | ||
| ^ | ||
| value shadowed2 in class Derived shadows field shadowed2 inherited from trait Base | ||
-- Warning: tests/neg/i17612b/i17612b.scala:24:2 ----------------------------------------------------------------------- | ||
24 | private[this] val shadowed3 = 3 + 3 // warn | ||
-- Error: tests/neg/i17612b/i17612b.scala:24:2 ------------------------------------------------------------------------- | ||
24 | private[this] val shadowed3 = 3 + 3 // error | ||
| ^ | ||
| value shadowed3 in class Derived shadows field shadowed3 inherited from trait Base | ||
-- Warning: tests/neg/i17612b/i17612b.scala:26:2 ----------------------------------------------------------------------- | ||
26 | private val shadowed5 = 5 + 5 // warn | ||
-- Error: tests/neg/i17612b/i17612b.scala:26:2 ------------------------------------------------------------------------- | ||
26 | private val shadowed5 = 5 + 5 // error | ||
| ^ | ||
| value shadowed5 in class Derived shadows field shadowed5 inherited from trait Base | ||
-- Warning: tests/neg/i17612b/i17612b.scala:41:20 ---------------------------------------------------------------------- | ||
41 | class UnderDerived(x: Int, y: Int, z: Int) extends Derived(x, 1, y, z) // warn // warn // warn | ||
-- Error: tests/neg/i17612b/i17612b.scala:41:20 ------------------------------------------------------------------------ | ||
41 | class UnderDerived(x: Int, y: Int, z: Int) extends Derived(x, 1, y, z) // error // error // error | ||
| ^ | ||
| value x in class UnderDerived shadows field x inherited from trait Base | ||
-- Warning: tests/neg/i17612b/i17612b.scala:41:28 ---------------------------------------------------------------------- | ||
41 | class UnderDerived(x: Int, y: Int, z: Int) extends Derived(x, 1, y, z) // warn // warn // warn | ||
-- Error: tests/neg/i17612b/i17612b.scala:41:28 ------------------------------------------------------------------------ | ||
41 | class UnderDerived(x: Int, y: Int, z: Int) extends Derived(x, 1, y, z) // error // error // error | ||
| ^ | ||
| value y in class UnderDerived shadows field y inherited from trait Base | ||
-- Warning: tests/neg/i17612b/i17612b.scala:41:36 ---------------------------------------------------------------------- | ||
41 | class UnderDerived(x: Int, y: Int, z: Int) extends Derived(x, 1, y, z) // warn // warn // warn | ||
-- Error: tests/neg/i17612b/i17612b.scala:41:36 ------------------------------------------------------------------------ | ||
41 | class UnderDerived(x: Int, y: Int, z: Int) extends Derived(x, 1, y, z) // error // error // error | ||
| ^ | ||
| value z in class UnderDerived shadows field z inherited from trait Base | ||
No warnings can be incurred under -Werror. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,56 @@ | ||
-- Warning: tests/neg/i17613b/i17613b.scala:7:18 ----------------------------------------------------------------------- | ||
7 | trait Typeclass[T] | ||
| ^ | ||
| Type parameter T for trait Typeclass shadows the type defined by type T in class B | ||
-- Warning: tests/neg/i17613b/i17613b.scala:10:13 ---------------------------------------------------------------------- | ||
10 | def foobar[ImTrait](in: D) = in.toString // warn | ||
| ^^^^^^^ | ||
| Type parameter ImTrait for method foobar shadows the type defined by trait ImTrait in object importTry | ||
-- Warning: tests/neg/i17613b/i17613b.scala:11:13 ---------------------------------------------------------------------- | ||
11 | type MySeq[ImTrait] = Seq[D] // warn | ||
-- Error: tests/neg/i17613b/i17613b.scala:9:13 ------------------------------------------------------------------------- | ||
9 | def foobar[ImTrait](in: D) = in.toString // error | ||
| ^^^^^^^ | ||
| Type parameter ImTrait for method foobar shadows the type defined by trait ImTrait in object importTry | ||
-- Error: tests/neg/i17613b/i17613b.scala:10:13 ------------------------------------------------------------------------ | ||
10 | type MySeq[ImTrait] = Seq[D] // error | ||
| ^^^^^^^ | ||
| Type parameter ImTrait for type MySeq shadows the type defined by trait ImTrait in object importTry | ||
-- Warning: tests/neg/i17613b/i17613b.scala:13:14 ---------------------------------------------------------------------- | ||
13 | def foobar2[ImClass](in: D) = in.toString // warn | ||
-- Error: tests/neg/i17613b/i17613b.scala:12:14 ------------------------------------------------------------------------ | ||
12 | def foobar2[ImClass](in: D) = in.toString // error | ||
| ^^^^^^^ | ||
| Type parameter ImClass for method foobar2 shadows the type defined by class ImClass in object importTry | ||
-- Warning: tests/neg/i17613b/i17613b.scala:14:14 ---------------------------------------------------------------------- | ||
14 | type MySeq2[ImClass] = Seq[D] // warn | ||
-- Error: tests/neg/i17613b/i17613b.scala:13:14 ------------------------------------------------------------------------ | ||
13 | type MySeq2[ImClass] = Seq[D] // error | ||
| ^^^^^^^ | ||
| Type parameter ImClass for type MySeq2 shadows the type defined by class ImClass in object importTry | ||
-- Warning: tests/neg/i17613b/i17613b.scala:17:24 ---------------------------------------------------------------------- | ||
17 | type TypeLambda[A] = [ImTrait] =>> Map[ImTrait, B] | ||
-- Error: tests/neg/i17613b/i17613b.scala:16:24 ------------------------------------------------------------------------ | ||
16 | type TypeLambda[A] = [ImTrait] =>> Map[ImTrait, B] // error | ||
| ^^^^^^^ | ||
| Type parameter ImTrait for type TypeLambda shadows the type defined by trait ImTrait in object importTry | ||
-- Warning: tests/neg/i17613b/i17613b.scala:18:21 ---------------------------------------------------------------------- | ||
18 | type PolyFun[A] = [ImTrait] => ImTrait => B // warn | ||
-- Error: tests/neg/i17613b/i17613b.scala:17:21 ------------------------------------------------------------------------ | ||
17 | type PolyFun[A] = [ImTrait] => ImTrait => B // error | ||
| ^^^^^^^ | ||
| Type parameter ImTrait for type PolyFun shadows the type defined by trait ImTrait in object importTry | ||
-- Warning: tests/neg/i17613b/i17613b.scala:24:12 ---------------------------------------------------------------------- | ||
24 | class Foo[T](t: T): // warn class parameter shadows some other type | ||
-- Error: tests/neg/i17613b/i17613b.scala:23:12 ------------------------------------------------------------------------ | ||
23 | class Foo[T](t: T): // error class parameter shadows some other type | ||
| ^ | ||
| Type parameter T for class Foo shadows the type defined by type T in class B | ||
-- Warning: tests/neg/i17613b/i17613b.scala:28:15 ---------------------------------------------------------------------- | ||
28 | def intType[List1](x: T) = x.toString() // warn | ||
-- Error: tests/neg/i17613b/i17613b.scala:27:15 ------------------------------------------------------------------------ | ||
27 | def intType[List1](x: T) = x.toString() // error | ||
| ^^^^^ | ||
| Type parameter List1 for method intType shadows an explicitly renamed type : List1 | ||
-- Warning: tests/neg/i17613b/i17613b.scala:33:10 ---------------------------------------------------------------------- | ||
33 | given [Int]: Typeclass[Int]() // warn | ||
-- Error: tests/neg/i17613b/i17613b.scala:32:10 ------------------------------------------------------------------------ | ||
32 | given [Int]: Ordering[Int]() // error | ||
| ^^^ | ||
| Type parameter Int for method given_Typeclass_Int shadows the type defined by class Int in package scala | ||
-- Warning: tests/neg/i17613b/i17613b.scala:35:12 ---------------------------------------------------------------------- | ||
35 | class C[M[List[_]]] // warn List not renamed here | ||
| Type parameter Int for method given_Ordering_Int shadows the type defined by class Int in package scala | ||
-- Error: tests/neg/i17613b/i17613b.scala:34:12 ------------------------------------------------------------------------ | ||
34 | class C[M[List[_]]] // error List not renamed here | ||
| ^^^^^^^ | ||
| Type parameter List for class C shadows the type defined by type List in package scala | ||
-- Warning: tests/neg/i17613b/i17613b.scala:36:11 ---------------------------------------------------------------------- | ||
36 | type E[M[Int[_]]] = Int // warn | ||
-- Error: tests/neg/i17613b/i17613b.scala:35:11 ------------------------------------------------------------------------ | ||
35 | type E[M[Int[_]]] = Int // error | ||
| ^^^^^^ | ||
| Type parameter Int for type E shadows the type defined by class Int in package scala | ||
-- Warning: tests/neg/i17613b/i17613b.scala:38:14 ---------------------------------------------------------------------- | ||
38 | def foo[N[M[List[_]]]] = // warn | ||
-- Error: tests/neg/i17613b/i17613b.scala:37:14 ------------------------------------------------------------------------ | ||
37 | def foo[N[M[List[_]]]] = // error | ||
| ^^^^^^^ | ||
| Type parameter List for method foo shadows the type defined by type List in package scala | ||
-- Warning: tests/neg/i17613b/i17613b.scala:41:11 ---------------------------------------------------------------------- | ||
41 | type Z[ImClassR] = Int // warn | ||
-- Error: tests/neg/i17613b/i17613b.scala:40:11 ------------------------------------------------------------------------ | ||
40 | type Z[ImClassR] = Int // error | ||
| ^^^^^^^^ | ||
| Type parameter ImClassR for type Z shadows an explicitly renamed type : ImClassR | ||
-- Warning: tests/neg/i17613b/i17613b.scala:42:18 ---------------------------------------------------------------------- | ||
42 | class InnerCl[ImClassR] // warn | ||
-- Error: tests/neg/i17613b/i17613b.scala:41:18 ------------------------------------------------------------------------ | ||
41 | class InnerCl[ImClassR] // error | ||
| ^^^^^^^^ | ||
| Type parameter ImClassR for class InnerCl shadows an explicitly renamed type : ImClassR | ||
No warnings can be incurred under -Werror. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
|
||
-- Migration Warning: tests/neg/i9408b/Test_2.scala:8:20 --------------------------------------------------------------- | ||
8 | val length: Int = "abc" // warn | ||
-- Error: tests/neg/i9408b/Test_2.scala:8:20 --------------------------------------------------------------------------- | ||
8 | val length: Int = "abc" // error | ||
| ^^^^^ | ||
|The conversion (test.conversions.Conv.implicitLength : String => Int) will not be applied implicitly here in Scala 3 because only implicit methods and instances of Conversion class will continue to work as implicit views. | ||
No warnings can be incurred under -Werror. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters