Skip to content

Commit

Permalink
First batch of neg -> warn test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
szymon-rd committed Dec 18, 2023
1 parent 19b7386 commit c22feb8
Show file tree
Hide file tree
Showing 138 changed files with 915 additions and 881 deletions.
28 changes: 0 additions & 28 deletions tests/neg/i10247.scala

This file was deleted.

15 changes: 0 additions & 15 deletions tests/neg/i10930.scala

This file was deleted.

4 changes: 0 additions & 4 deletions tests/neg/i10994.scala

This file was deleted.

20 changes: 0 additions & 20 deletions tests/neg/i11022.check

This file was deleted.

13 changes: 0 additions & 13 deletions tests/neg/i11022.scala

This file was deleted.

6 changes: 6 additions & 0 deletions tests/neg/i11225b.check
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
-- Error: tests/neg/i11225b.scala:6:26 ---------------------------------------------------------------------------------
6 | private var cached: A = _ // error
| ^
| `= _` has been deprecated; use `= uninitialized` instead.
| `uninitialized` can be imported with `scala.compiletime.uninitialized`.
| This construct can be rewritten automatically under -rewrite -source 3.4-migration.
3 changes: 2 additions & 1 deletion tests/neg/i11225b.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//> using options -source future -deprecation -Xfatal-warnings
//> using options -source future -deprecation

import compiletime.uninitialized

Expand All @@ -10,3 +10,4 @@ class Memo[A](x: => A):
known = true
cached = x
cached

30 changes: 0 additions & 30 deletions tests/neg/i11333.check

This file was deleted.

14 changes: 0 additions & 14 deletions tests/neg/i11333.scala

This file was deleted.

3 changes: 0 additions & 3 deletions tests/neg/i11963a.scala

This file was deleted.

3 changes: 0 additions & 3 deletions tests/neg/i11963b.scala

This file was deleted.

8 changes: 0 additions & 8 deletions tests/neg/i11963c.scala

This file was deleted.

7 changes: 0 additions & 7 deletions tests/neg/i12597.scala

This file was deleted.

9 changes: 0 additions & 9 deletions tests/neg/i13440.scala

This file was deleted.

5 changes: 0 additions & 5 deletions tests/neg/i14705.scala

This file was deleted.

20 changes: 0 additions & 20 deletions tests/neg/i15503h.scala

This file was deleted.

33 changes: 17 additions & 16 deletions tests/neg/i17612b.check
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@
-- 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
-- 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
| ^
| value x in class Derived shadows field x inherited from trait Base
-- 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
-- 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
| ^
| value y in class Derived shadows field y inherited from trait Base
-- 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)
-- 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)
| ^
| value shadowed2 in class Derived shadows field shadowed2 inherited from trait Base
-- Error: tests/neg/i17612b/i17612b.scala:24:2 -------------------------------------------------------------------------
24 | private[this] val shadowed3 = 3 + 3 // error
-- Warning: tests/neg/i17612b/i17612b.scala:24:2 -----------------------------------------------------------------------
24 | private[this] val shadowed3 = 3 + 3 // warn
| ^
| value shadowed3 in class Derived shadows field shadowed3 inherited from trait Base
-- Error: tests/neg/i17612b/i17612b.scala:26:2 -------------------------------------------------------------------------
26 | private val shadowed5 = 5 + 5 // error
-- Warning: tests/neg/i17612b/i17612b.scala:26:2 -----------------------------------------------------------------------
26 | private val shadowed5 = 5 + 5 // warn
| ^
| value shadowed5 in class Derived shadows field shadowed5 inherited from trait Base
-- 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
-- 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
| ^
| value x in class UnderDerived shadows field x inherited from trait Base
-- 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
-- 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
| ^
| value y in class UnderDerived shadows field y inherited from trait Base
-- 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
-- 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
| ^
| value z in class UnderDerived shadows field z inherited from trait Base
No warnings can be incurred under -Werror.
23 changes: 0 additions & 23 deletions tests/neg/i17613a.scala

This file was deleted.

Loading

0 comments on commit c22feb8

Please sign in to comment.