File: t8597.check

package info (click to toggle)
scala 2.11.12-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 62,924 kB
  • sloc: javascript: 28,808; java: 13,415; xml: 3,135; sh: 1,620; python: 756; makefile: 38; awk: 36; ansic: 6
file content (21 lines) | stat: -rw-r--r-- 1,673 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
t8597.scala:2: warning: abstract type T in type pattern Some[T] is unchecked since it is eliminated by erasure
  def nowarn[T] = (null: Any) match { case _: Some[T]      => } // warn (did not warn due to SI-8597)
                                              ^
t8597.scala:5: warning: abstract type pattern T is unchecked since it is eliminated by erasure
  def warn1[T]  = (null: Any) match { case _: T            => } // warn
                                              ^
t8597.scala:6: warning: non-variable type argument String in type pattern Some[String] is unchecked since it is eliminated by erasure
  def warn2     = (null: Any) match { case _: Some[String] => } // warn
                                              ^
t8597.scala:7: warning: non-variable type argument Unchecked.this.C in type pattern Some[Unchecked.this.C] is unchecked since it is eliminated by erasure
                  (null: Any) match { case _: Some[C]      => } // warn
                                              ^
t8597.scala:18: warning: abstract type T in type pattern Array[T] is unchecked since it is eliminated by erasure
  def warnArray[T] = (null: Any) match { case _: Array[T] => } // warn (did not warn due to SI-8597)
                                                 ^
t8597.scala:26: warning: non-variable type argument String in type pattern Array[Array[List[String]]] is unchecked since it is eliminated by erasure
  def warnArrayErasure2   = (null: Any) match {case Some(_: Array[Array[List[String]]]) => } // warn
                                                            ^
error: No warnings can be incurred under -Xfatal-warnings.
6 warnings found
one error found