diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-09-28 04:46:02 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-09-28 04:46:02 -0700 |
commit | 57db28c55c3610f508b07940f7077cb73932418f (patch) | |
tree | 70b62aa01670cfc4b0877327a96e9d434f152418 /test/files/neg/unchecked-refinement.check | |
parent | 0614d2f512ad7b1b3885f81d9e6e779f447a6511 (diff) | |
parent | 211c9620ba83de143ea4776f55a3e0c4de11d002 (diff) | |
download | scala-57db28c55c3610f508b07940f7077cb73932418f.tar.gz scala-57db28c55c3610f508b07940f7077cb73932418f.tar.bz2 scala-57db28c55c3610f508b07940f7077cb73932418f.zip |
Merge pull request #1399 from paulp/210-unchecked
Much better unchecked warnings.
Diffstat (limited to 'test/files/neg/unchecked-refinement.check')
-rw-r--r-- | test/files/neg/unchecked-refinement.check | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/files/neg/unchecked-refinement.check b/test/files/neg/unchecked-refinement.check new file mode 100644 index 0000000000..d81517464f --- /dev/null +++ b/test/files/neg/unchecked-refinement.check @@ -0,0 +1,13 @@ +unchecked-refinement.scala:17: error: abstract type U in type pattern Foo[U,U,V] is unchecked since it is eliminated by erasure + /* warn */ case _: Foo[U, U, V] if b => () + ^ +unchecked-refinement.scala:19: error: non-variable type argument Any in type pattern Foo[Any,U,V] is unchecked since it is eliminated by erasure + /* warn */ case _: Foo[Any, U, V] if b => () + ^ +unchecked-refinement.scala:23: error: a pattern match on a refinement type is unchecked + /* nowarn - todo */ case x: AnyRef { def bippy: Int } if b => x.bippy // this could/should do an instance check and not warn + ^ +unchecked-refinement.scala:24: error: a pattern match on a refinement type is unchecked + /* nowarn - todo */ case x: AnyRef { def size: Int } if b => x.size // this could/should do a static conformance test and not warn + ^ +four errors found |