aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Contexts.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-12-16 18:02:19 +0100
committerMartin Odersky <odersky@gmail.com>2014-12-16 18:02:19 +0100
commit009a1e69e7bdc3df1b085d2271042607c83b1e82 (patch)
tree6d1acf8147a23e6f13015a34abefbdf96f147be4 /src/dotty/tools/dotc/core/Contexts.scala
parent16554c0efe2d09ab3ef760522f0811a964f7ee84 (diff)
downloaddotty-009a1e69e7bdc3df1b085d2271042607c83b1e82.tar.gz
dotty-009a1e69e7bdc3df1b085d2271042607c83b1e82.tar.bz2
dotty-009a1e69e7bdc3df1b085d2271042607c83b1e82.zip
Made gadt map better encapsulated.
Diffstat (limited to 'src/dotty/tools/dotc/core/Contexts.scala')
-rw-r--r--src/dotty/tools/dotc/core/Contexts.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala
index 2477fd4a4..f048c27aa 100644
--- a/src/dotty/tools/dotc/core/Contexts.scala
+++ b/src/dotty/tools/dotc/core/Contexts.scala
@@ -601,7 +601,12 @@ object Contexts {
implicit val ctx: Context = initctx
}
- class GADTMap(var bounds: SimpleMap[Symbol, TypeBounds])
+ class GADTMap(initBounds: SimpleMap[Symbol, TypeBounds]) {
+ private var myBounds = initBounds
+ def setBounds(sym: Symbol, b: TypeBounds): Unit =
+ myBounds = myBounds.updated(sym, b)
+ def bounds = myBounds
+ }
/** Initial size of superId table */
private final val InitialSuperIdsSize = 4096