diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-04 18:39:50 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:11:21 +0200 |
commit | be53234352f75aca456ed131163b45230e4638af (patch) | |
tree | c30f661ed056bf81df1dfe9494b8f92bcb733330 /src/dotty/tools/dotc | |
parent | 379bb24e55d88434faa32d2d324fcadb42af960d (diff) | |
download | dotty-be53234352f75aca456ed131163b45230e4638af.tar.gz dotty-be53234352f75aca456ed131163b45230e4638af.tar.bz2 dotty-be53234352f75aca456ed131163b45230e4638af.zip |
Add comment missing from last PR
Diffstat (limited to 'src/dotty/tools/dotc')
-rw-r--r-- | src/dotty/tools/dotc/core/TyperState.scala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/TyperState.scala b/src/dotty/tools/dotc/core/TyperState.scala index 7b8867ccc..3ed4788ee 100644 --- a/src/dotty/tools/dotc/core/TyperState.scala +++ b/src/dotty/tools/dotc/core/TyperState.scala @@ -122,6 +122,18 @@ extends TyperState(r) { * type variables changes from this typer state to the current one. (2) Variables * that were temporarily instantiated in the current typer state are permanently * instantiated instead. + * + * A note on merging: A case is in isApplicableSafe.scala. It turns out that this + * requires a context merge using the new `&' operator. Sequence of actions: + * 1) Typecheck argument in typerstate 1. + * 2) Cache argument. + * 3) Evolve same typer state (to typecheck other arguments, say) + * leading to a different constraint. + * 4) Take typechecked argument in same state. + * + * It turns out that the merge is needed not just for + * isApplicableSafe but also for (e.g. erased-lubs.scala) as well as + * many parts of dotty itself. */ override def commit()(implicit ctx: Context) = { val targetState = ctx.typerState |