From 039d826e99519bcf363e92bba7d9a5bc82e708ef Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Tue, 12 Jun 2012 19:28:59 -0700 Subject: Suppress non-local return unchecked warnings. There doesn't seem to be any way to do that by adding a synthetic annotation. --- src/compiler/scala/tools/nsc/typechecker/Infer.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index 9e371dd2dd..688dcd91ac 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -1276,7 +1276,8 @@ trait Infer { } else { for (arg <- args) { if (sym == ArrayClass) check(arg, bound) - else if (arg.typeArgs.nonEmpty) () // avoid spurious warnings with higher-kinded types + else if (arg.typeArgs.nonEmpty) () // avoid spurious warnings with higher-kinded types + else if (sym == NonLocalReturnControlClass) () // no way to suppress unchecked warnings on try/catch else arg match { case TypeRef(_, sym, _) if isLocalBinding(sym) => ; -- cgit v1.2.3