aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Flags.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-12-11 18:47:18 +0100
committerMartin Odersky <odersky@gmail.com>2014-12-16 17:46:14 +0100
commit16554c0efe2d09ab3ef760522f0811a964f7ee84 (patch)
treeb3c94dc415850f264c16dbd0b91418e49947045a /src/dotty/tools/dotc/core/Flags.scala
parent21fa5dd1a47727c977848163e2610be745951dbc (diff)
downloaddotty-16554c0efe2d09ab3ef760522f0811a964f7ee84.tar.gz
dotty-16554c0efe2d09ab3ef760522f0811a964f7ee84.tar.bz2
dotty-16554c0efe2d09ab3ef760522f0811a964f7ee84.zip
Fixed #264 - failure to typecheck GADTs
The previous scheme derived the right bounds, but then failed to use them because a TypeRef already has a set info (its bounds). Changing the bounds in the symbol by a side effect does not affect that. This is good! But it showed that the previous scheme was too fragile because it used a sneaky side effect when updating the symbol info which failed to propgate into the cached info in TypeRef. We now keep GADT computed bounds separate form the symbol info in a map `gadt` in the current context.
Diffstat (limited to 'src/dotty/tools/dotc/core/Flags.scala')
-rw-r--r--src/dotty/tools/dotc/core/Flags.scala5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Flags.scala b/src/dotty/tools/dotc/core/Flags.scala
index 0e86a2936..53beae838 100644
--- a/src/dotty/tools/dotc/core/Flags.scala
+++ b/src/dotty/tools/dotc/core/Flags.scala
@@ -301,9 +301,6 @@ object Flags {
/** Method is assumed to be stable */
final val Stable = termFlag(24, "<stable>")
- /** Info can be refined during GADT pattern match */
- final val GADTFlexType = typeFlag(24, "<gadt-flex-type>")
-
/** A case parameter accessor */
final val CaseAccessor = termFlag(25, "<caseaccessor>")
@@ -553,7 +550,7 @@ object Flags {
/** A Java interface, potentially with default methods */
final val JavaTrait = allOf(JavaDefined, Trait, NoInits)
-
+
/** A Java interface */
final val JavaInterface = allOf(JavaDefined, Trait)