summaryrefslogtreecommitdiff
path: root/test/files/neg/unchecked-refinement.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-09-28 06:55:49 -0700
committerPaul Phillips <paulp@improving.org>2012-09-28 07:19:01 -0700
commit886c4061222773d76f3ee3f4ff1469f9d4a48eaf (patch)
tree70b13842e325bafd48e5494c844078f35b02f5b7 /test/files/neg/unchecked-refinement.check
parent41f37bc428a309b9766f545da0179f270ea01d77 (diff)
parent57db28c55c3610f508b07940f7077cb73932418f (diff)
downloadscala-886c4061222773d76f3ee3f4ff1469f9d4a48eaf.tar.gz
scala-886c4061222773d76f3ee3f4ff1469f9d4a48eaf.tar.bz2
scala-886c4061222773d76f3ee3f4ff1469f9d4a48eaf.zip
Merge branch '2.10.x' into 210-merge
* 2.10.x: (37 commits) Added logic and tests for unchecked refinements. Moved isNonRefinementClassType somewhere logical. Moved two tests to less breaky locations. Nailed down the "impossible match" logic. Finish docs for string interpolation. moves Context.ParseError outside the cake revives macros.Infrastructure moves Context.runtimeUniverse to TreeBuild.mkRuntimeUniverseRef a more precise type for Context.mirror gets rid of macros.Infrastructure simplifies Context.Run and Context.CompilationUnit exposes Position.source as SourceFile removes extraneous stuff from macros.Infrastructure merges macros.CapturedVariables into macros.Universe merges macros.Exprs and macros.TypeTags into Context removes front ends from scala-reflect.jar PositionApi => Position hides BuildUtils from Scaladoc MirrorOf => Mirror docs.pre-lib now checks for mods in reflect ... Conflicts: test/files/neg/t4302.check test/files/neg/unchecked.check test/files/neg/unchecked2.check
Diffstat (limited to 'test/files/neg/unchecked-refinement.check')
-rw-r--r--test/files/neg/unchecked-refinement.check15
1 files changed, 15 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..e85a51f44d
--- /dev/null
+++ b/test/files/neg/unchecked-refinement.check
@@ -0,0 +1,15 @@
+unchecked-refinement.scala:17: warning: 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: warning: 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: warning: 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: warning: 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
+ ^
+error: No warnings can be incurred under -Xfatal-warnings.
+four warnings found
+one error found