|
| 1 | +-- [E002] Syntax Warning: tests/warn/nowarn.scala:5:10 ----------------------------------------------------------------- |
| 2 | +5 |def t1a = try 1 // warn (parser) |
| 3 | + | ^^^^^ |
| 4 | + | A try without catch or finally is equivalent to putting |
| 5 | + | its body in a block; no exceptions are handled. |
| 6 | + | |
| 7 | + | longer explanation available when compiling with `-explain` |
| 8 | +-- [E002] Syntax Warning: tests/warn/nowarn.scala:19:25 ---------------------------------------------------------------- |
| 9 | +19 |@nowarn(o.inl) def t2d = try 1 // warn // warn (`inl` is not a compile-time constant) |
| 10 | + | ^^^^^ |
| 11 | + | A try without catch or finally is equivalent to putting |
| 12 | + | its body in a block; no exceptions are handled. |
| 13 | + | |
| 14 | + | longer explanation available when compiling with `-explain` |
| 15 | +-- [E002] Syntax Warning: tests/warn/nowarn.scala:27:26 ---------------------------------------------------------------- |
| 16 | +27 |@nowarn("id=1") def t4d = try 1 // warn // warn (unused nowarn, wrong id) |
| 17 | + | ^^^^^ |
| 18 | + | A try without catch or finally is equivalent to putting |
| 19 | + | its body in a block; no exceptions are handled. |
| 20 | + | |
| 21 | + | longer explanation available when compiling with `-explain` |
| 22 | +-- [E002] Syntax Warning: tests/warn/nowarn.scala:29:28 ---------------------------------------------------------------- |
| 23 | +29 |@nowarn("verbose") def t5 = try 1 // warn with details |
| 24 | + | ^^^^^ |
| 25 | + | A try without catch or finally is equivalent to putting |
| 26 | + | its body in a block; no exceptions are handled. |
| 27 | + |Matching filters for @nowarn or -Wconf: |
| 28 | + | - id=E2 |
| 29 | + | - name=EmptyCatchAndFinallyBlock |
| 30 | + | |
| 31 | + | longer explanation available when compiling with `-explain` |
| 32 | +-- [E129] Potential Issue Warning: tests/warn/nowarn.scala:9:11 -------------------------------------------------------- |
| 33 | +9 |def t2 = { 1; 2 } // warn (the invalid nowarn doesn't silence anything) |
| 34 | + | ^ |
| 35 | + | A pure expression does nothing in statement position |
| 36 | + | |
| 37 | + | longer explanation available when compiling with `-explain` |
| 38 | +-- Warning: tests/warn/nowarn.scala:8:8 -------------------------------------------------------------------------------- |
| 39 | +8 |@nowarn("wat?") // warn (typer, invalid filter) |
| 40 | + | ^^^^^^ |
| 41 | + | Invalid message filter |
| 42 | + | unknown filter: wat? |
| 43 | +-- [E129] Potential Issue Warning: tests/warn/nowarn.scala:12:12 ------------------------------------------------------- |
| 44 | +12 |def t2a = { 1; 2 } // warn (invalid nowarn doesn't silence) |
| 45 | + | ^ |
| 46 | + | A pure expression does nothing in statement position |
| 47 | + | |
| 48 | + | longer explanation available when compiling with `-explain` |
| 49 | +-- Warning: tests/warn/nowarn.scala:11:8 ------------------------------------------------------------------------------- |
| 50 | +11 |@nowarn(t1a.toString) // warn (typer, argument not a compile-time constant) |
| 51 | + | ^^^^^^^^^^^^ |
| 52 | + | filter needs to be a compile-time constant string |
| 53 | +-- Warning: tests/warn/nowarn.scala:19:10 ------------------------------------------------------------------------------ |
| 54 | +19 |@nowarn(o.inl) def t2d = try 1 // warn // warn (`inl` is not a compile-time constant) |
| 55 | + | ^^^^^ |
| 56 | + | filter needs to be a compile-time constant string |
| 57 | +-- Deprecation Warning: tests/warn/nowarn.scala:33:10 ------------------------------------------------------------------ |
| 58 | +33 |def t6a = f // warn (refchecks, deprecation) |
| 59 | + | ^ |
| 60 | + | method f is deprecated |
| 61 | +-- Deprecation Warning: tests/warn/nowarn.scala:36:30 ------------------------------------------------------------------ |
| 62 | +36 |@nowarn("msg=fish") def t6d = f // warn (unused nowarn) // warn (deprecation) |
| 63 | + | ^ |
| 64 | + | method f is deprecated |
| 65 | +-- Deprecation Warning: tests/warn/nowarn.scala:43:10 ------------------------------------------------------------------ |
| 66 | +43 |def t7c = f // warn (deprecation) |
| 67 | + | ^ |
| 68 | + | method f is deprecated |
| 69 | +-- [E092] Pattern Match Unchecked Warning: tests/warn/nowarn.scala:49:7 ------------------------------------------------ |
| 70 | +49 | case _: List[Int] => 0 // warn (patmat, unchecked) |
| 71 | + | ^ |
| 72 | + |the type test for List[Int] cannot be checked at runtime because its type arguments can't be determined from Any |
| 73 | + | |
| 74 | + | longer explanation available when compiling with `-explain` |
| 75 | +-- Warning: tests/warn/nowarn.scala:27:1 ------------------------------------------------------------------------------- |
| 76 | +27 |@nowarn("id=1") def t4d = try 1 // warn // warn (unused nowarn, wrong id) |
| 77 | + |^^^^^^^^^^^^^^^ |
| 78 | + |@nowarn annotation does not suppress any warnings |
| 79 | +-- Warning: tests/warn/nowarn.scala:36:1 ------------------------------------------------------------------------------- |
| 80 | +36 |@nowarn("msg=fish") def t6d = f // warn (unused nowarn) // warn (deprecation) |
| 81 | + |^^^^^^^^^^^^^^^^^^^ |
| 82 | + |@nowarn annotation does not suppress any warnings |
| 83 | +-- Warning: tests/warn/nowarn.scala:44:5 ------------------------------------------------------------------------------- |
| 84 | +44 | : @nowarn("msg=fish") // warn (unused nowarn) |
| 85 | + | ^^^^^^^^^^^^^^^^^^^ |
| 86 | + | @nowarn annotation does not suppress any warnings |
| 87 | +-- Warning: tests/warn/nowarn.scala:56:0 ------------------------------------------------------------------------------- |
| 88 | +56 |@nowarn def t9a = { 1: @nowarn; 2 } // warn (outer @nowarn is unused) |
| 89 | + |^^^^^^^ |
| 90 | + |@nowarn annotation does not suppress any warnings but matches a diagnostic |
| 91 | +-- Warning: tests/warn/nowarn.scala:57:27 ------------------------------------------------------------------------------ |
| 92 | +57 |@nowarn def t9b = { 1: Int @nowarn; 2 } // warn (inner @nowarn is unused, it covers the type, not the expression) |
| 93 | + | ^^^^^^^ |
| 94 | + | @nowarn annotation does not suppress any warnings |
| 95 | +-- Warning: tests/warn/nowarn.scala:62:0 ------------------------------------------------------------------------------- |
| 96 | +62 |@nowarn @ann(f) def t10b = 0 // warn (unused nowarn) |
| 97 | + |^^^^^^^ |
| 98 | + |@nowarn annotation does not suppress any warnings |
| 99 | +-- Warning: tests/warn/nowarn.scala:63:8 ------------------------------------------------------------------------------- |
| 100 | +63 |@ann(f: @nowarn) def t10c = 0 // warn (unused nowarn), should be silent |
| 101 | + | ^^^^^^^ |
| 102 | + | @nowarn annotation does not suppress any warnings |
| 103 | +-- Warning: tests/warn/nowarn.scala:66:0 ------------------------------------------------------------------------------- |
| 104 | +66 |@nowarn class I1a { // warn (unused nowarn) |
| 105 | + |^^^^^^^ |
| 106 | + |@nowarn annotation does not suppress any warnings but matches a diagnostic |
| 107 | +-- Warning: tests/warn/nowarn.scala:71:0 ------------------------------------------------------------------------------- |
| 108 | +71 |@nowarn class I1b { // warn (unused nowarn) |
| 109 | + |^^^^^^^ |
| 110 | + |@nowarn annotation does not suppress any warnings but matches a diagnostic |
0 commit comments