aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Inferencing.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-30 14:45:51 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-03-31 14:52:40 +0200
commitd173cc048ebdbff30f6537f207118fc5717b8787 (patch)
treedb2ca3232dd3313b49335d72da238f7476f5cb3e /src/dotty/tools/dotc/typer/Inferencing.scala
parentcac8c752b626bc0a5f872572f8ec07274f5e9e0e (diff)
downloaddotty-d173cc048ebdbff30f6537f207118fc5717b8787.tar.gz
dotty-d173cc048ebdbff30f6537f207118fc5717b8787.tar.bz2
dotty-d173cc048ebdbff30f6537f207118fc5717b8787.zip
Renaming clear->setNew
clear is wrong. E.g. clearTyperState does not clear the typerstate at all. It installs a fresh (i.e. cloned) copy of the previous one. clearScope is also wrong; it installs a new scope, does not clear the current one.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Inferencing.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Inferencing.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Inferencing.scala b/src/dotty/tools/dotc/typer/Inferencing.scala
index 9c4ce232e..173ac3aeb 100644
--- a/src/dotty/tools/dotc/typer/Inferencing.scala
+++ b/src/dotty/tools/dotc/typer/Inferencing.scala
@@ -30,7 +30,7 @@ trait Inferencing { this: Checking =>
* Variables that are successfully minimized do not count as uninstantiated.
*/
def isFullyDefined(tp: Type, force: ForceDegree.Value)(implicit ctx: Context): Boolean = {
- val nestedCtx = ctx.fresh.clearTyperState
+ val nestedCtx = ctx.fresh.setNewTyperState
val result = new IsFullyDefinedAccumulator(force)(nestedCtx).process(tp)
if (result) nestedCtx.typerState.commit()
result