aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Applications.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-03-13 17:44:04 +0100
committerMartin Odersky <odersky@gmail.com>2015-03-13 17:45:03 +0100
commita56bc34fb850a6dca40c4f8562f3cb2d5b69dcc7 (patch)
treee9804c9402e33c35fb297bb6b03f456e7a472730 /src/dotty/tools/dotc/typer/Applications.scala
parent0ee93122b9e367c08ed1d81c9cfc5919fc3a32af (diff)
downloaddotty-a56bc34fb850a6dca40c4f8562f3cb2d5b69dcc7.tar.gz
dotty-a56bc34fb850a6dca40c4f8562f3cb2d5b69dcc7.tar.bz2
dotty-a56bc34fb850a6dca40c4f8562f3cb2d5b69dcc7.zip
add/strict
Add -strict option to do some type checks that are encessary to ensure type soundness, but are stricter than what Scala 2.x enforces. The first such test is the "pattern cannot be uniquely instantiated" problem where we reject a non-variant case subclass of a covariant superclass in a pattern match. The error is now only issued in -struct mode, otherwise it will be a warning. We might move more tests into the same category. This should help the transition.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Applications.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala
index c012e8837..47dfe157d 100644
--- a/src/dotty/tools/dotc/typer/Applications.scala
+++ b/src/dotty/tools/dotc/typer/Applications.scala
@@ -716,7 +716,7 @@ trait Applications extends Compatibility { self: Typer =>
if (ctx.settings.verbose.value) ctx.warning(msg, tree.pos)
} else {
unapp.println(s" ${unapplyFn.symbol.owner} ${unapplyFn.symbol.owner is Scala2x}")
- ctx.error(msg, tree.pos)
+ ctx.strictWarning(msg, tree.pos)
}
case _ =>
}