Skip to content

Commit 5830643

Browse files
Revert/fix warnings changes on pending/run tests
1 parent ebb9895 commit 5830643

18 files changed

+73
-7
lines changed

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,8 @@ class CompilationTests extends ParallelTesting {
194194
compileFile("tests/neg-custom-args/phantom-overload.scala", allowDoubleBindings) +
195195
compileFile("tests/neg-custom-args/phantom-overload-2.scala", allowDoubleBindings) +
196196
compileFile("tests/neg-custom-args/structural.scala", defaultOptions.and("-Xfatal-warnings")) +
197-
compileFile("tests/neg-custom-args/i2673.scala", defaultOptions.and("-Xfatal-warnings"))
197+
compileFile("tests/neg-custom-args/i2673.scala", defaultOptions.and("-Xfatal-warnings")) +
198+
compileFile("tests/neg-custom-args/t3235-minimal.scala", defaultOptions.and("-Xfatal-warnings"))
198199
}.checkExpectedErrors()
199200

200201
// Run tests -----------------------------------------------------------------
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
object Test {
2+
def main(args: Array[String]): Unit = {
3+
assert(123456789.round == 123456789) // error
4+
assert(math.round(123456789) == 123456789) // error
5+
assert(1234567890123456789L.round == 1234567890123456789L) // error
6+
assert(math.round(1234567890123456789L) == 1234567890123456789L) // error
7+
}
8+
}

tests/pending/run/t1368.check

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
t1368.scala:7: warning: Reference to uninitialized value blurp
2+
def go3 = (new AnyRef with Happy with Sad { override val status = blurp ; val blurp = "happysad" }).status
3+
^
File renamed without changes.

tests/pending/run/t2106.check

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
t2106.scala:7: warning: Could not inline required method foo because access level required by callee not matched by caller.
2+
def main(args: Array[String]): Unit = x.foo
3+
^
4+
t2106.scala:7: warning: At the end of the day, could not inline @inline-marked method foo
5+
def main(args: Array[String]): Unit = x.foo
6+
^
File renamed without changes.

tests/pending/run/t4047.check

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
t4047.scala:23: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
2+
a.foo
3+
^
4+
t4047.scala:24: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
5+
a.foo
6+
^
7+
t4047.scala:26: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
8+
b.foo
9+
^
10+
t4047.scala:27: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
11+
b.foo
12+
^
13+
Unit: called A.foo
14+
Unit: called B.foo
15+
Unit: called C.foo
16+
Unit: called D.foo
17+
Unit: called D.foo

tests/run/t4047.scala renamed to tests/pending/run/t4047.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
trait Foo[T] { def foo: T}
1+
trait Foo[T] { val foo: T}
22

33
class A extends Foo[Unit]{
44
lazy val foo = println("Unit: called A.foo")

tests/pending/run/t5380.check

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
t5380.scala:3: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
2+
val f = () => return try { 1 } catch { case _: Throwable => 0 }
3+
^
4+
t5380.scala:3: warning: a pure expression does nothing in statement position; you may be omitting necessary parentheses
5+
val f = () => return try { 1 } catch { case _: Throwable => 0 }
6+
^
7+
t5380.scala:3: warning: enclosing method main has result type Unit: return value discarded
8+
val f = () => return try { 1 } catch { case _: Throwable => 0 }
9+
^
File renamed without changes.

tests/pending/run/t7290.check

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
t7290.scala:4: warning: Pattern contains duplicate alternatives: 0
2+
case 0 | 0 => 0
3+
^
4+
t7290.scala:5: warning: Pattern contains duplicate alternatives: 2, 3
5+
case 2 | 2 | 2 | 3 | 2 | 3 => 0
6+
^
File renamed without changes.

tests/pending/run/t8266-octal-interp.check

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
t8266-octal-interp.scala:4: warning: Octal escape literals are deprecated, use \b instead.
2+
f"a\10c",
3+
^
4+
t8266-octal-interp.scala:5: warning: Octal escape literals are deprecated, use \t instead.
5+
f"a\11c",
6+
^
7+
t8266-octal-interp.scala:6: warning: Octal escape literals are deprecated, use \n instead.
8+
f"a\12c",
9+
^
10+
t8266-octal-interp.scala:7: warning: Octal escape literals are deprecated, use \r instead.
11+
f"a\15c",
12+
^
13+
t8266-octal-interp.scala:8: warning: Octal escape literals are deprecated, use ${'"'} or a triple-quoted literal """with embedded " or \u0022""" instead.
14+
f"a\42c",
15+
^
16+
t8266-octal-interp.scala:9: warning: Octal escape literals are deprecated, use \\ instead.
17+
f"a\134c",
18+
^
19+
t8266-octal-interp.scala:10: warning: Octal escape literals are deprecated, use \u0069 instead.
20+
f"a\15151515c"
21+
^
122
ac
223
a c
324
a

tests/run/t1368.check

Whitespace-only changes.

tests/run/t2106.check

Whitespace-only changes.

tests/run/t4047.check

Lines changed: 0 additions & 5 deletions
This file was deleted.

tests/run/t5380.check

Whitespace-only changes.

tests/run/t7290.check

Whitespace-only changes.

0 commit comments

Comments
 (0)