aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Mode.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-05-16 11:23:50 +0200
committerMartin Odersky <odersky@gmail.com>2015-05-21 17:41:13 +0200
commit9ab86534d7225edcafd3e16849b638c1d99aea69 (patch)
tree07d7e709c77f878442e7c1d3bda7f0189296db9d /src/dotty/tools/dotc/typer/Mode.scala
parent3d9d90e1a29a80f9df968a0e53e01ecb31c397c7 (diff)
downloaddotty-9ab86534d7225edcafd3e16849b638c1d99aea69.tar.gz
dotty-9ab86534d7225edcafd3e16849b638c1d99aea69.tar.bz2
dotty-9ab86534d7225edcafd3e16849b638c1d99aea69.zip
Add "Printing" mode
Idea: when printing, we should be more lenient about conditions that would otherwise cause an assertion failure, because we want to avoid triggering further assertions while diagnosing previous errors. As a start we generalize an assertion that RefinedTypes cannot be created after erasure. This gets triggered when playing around with printing lambdas at erasure time (see following commit): erasure runs at phase erasure + 1, so ctx.erasedTypes is true, but we might still want to print lambdas then, and printing lambdas will create new refined types as of next commit.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Mode.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Mode.scala2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/typer/Mode.scala b/src/dotty/tools/dotc/typer/Mode.scala
index 997741819..b585cc793 100644
--- a/src/dotty/tools/dotc/typer/Mode.scala
+++ b/src/dotty/tools/dotc/typer/Mode.scala
@@ -63,5 +63,7 @@ object Mode {
*/
val AllowDependentFunctions = newMode(9, "AllowDependentFunctions")
+ val Printing = newMode(10, "Printing")
+
val PatternOrType = Pattern | Type
}