diff options
author | Martin Odersky <odersky@gmail.com> | 2014-01-24 19:07:05 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-01-26 18:52:33 +0100 |
commit | d6b5f23bc389e1d7af0b69305708f59941dc34d1 (patch) | |
tree | 306c475e1156558515ed280929049e7f005639dc /src/dotty/tools/dotc/config/Config.scala | |
parent | f01071323516e699a169d89e5ac848215b6488c2 (diff) | |
download | dotty-d6b5f23bc389e1d7af0b69305708f59941dc34d1.tar.gz dotty-d6b5f23bc389e1d7af0b69305708f59941dc34d1.tar.bz2 dotty-d6b5f23bc389e1d7af0b69305708f59941dc34d1.zip |
Fixes to constraint handling.
In particular, need to unify polyparams before replacing one with the other, if the result wiould lead to a cyclic constraint.
Also: Avoid setting `inst` field of a type variable if a subtype operation is in progress, because the constraint might be retracted, and the instantiation should be retracted with it.
Third, tighter checks of cyclic constraint, and deep subtype recursions can now be demanded to cause an abort.
Diffstat (limited to 'src/dotty/tools/dotc/config/Config.scala')
-rw-r--r-- | src/dotty/tools/dotc/config/Config.scala | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/config/Config.scala b/src/dotty/tools/dotc/config/Config.scala index b47233bd8..6ac25ab74 100644 --- a/src/dotty/tools/dotc/config/Config.scala +++ b/src/dotty/tools/dotc/config/Config.scala @@ -12,7 +12,11 @@ object Config { final val checkConstraintsNonCyclic = true - final val traceDeepSubTypes = false + /** Throw an exception if a deep subtype recursion is detected */ + final val flagDeepSubTypeRecursions = true + + /** Show subtype traces for all deep subtype recursions */ + final val traceDeepSubTypeRecursions = false final val verboseExplainSubtype = true |