diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2014-10-02 21:44:08 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-10-02 21:44:08 +1000 |
commit | 192d65f718ab042cb57090d580c83e15a0509964 (patch) | |
tree | c460241bb554d8ec04aabcbb4714cfcda0a260a3 /src/compiler | |
parent | 955256f9b27ea6ec28ced548b4fe8ae4f98dd65d (diff) | |
parent | 84d46719a9ab3caa7ff46af4630d75f8c407c3d2 (diff) | |
download | scala-192d65f718ab042cb57090d580c83e15a0509964.tar.gz scala-192d65f718ab042cb57090d580c83e15a0509964.tar.bz2 scala-192d65f718ab042cb57090d580c83e15a0509964.zip |
Merge pull request #4021 from retronym/ticket/8869
SI-8869 Prevent ill-kindedness in type lambdas
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Contexts.scala | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala index a79f162140..eb29ccf4e1 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Contexts.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Contexts.scala @@ -480,6 +480,8 @@ trait Contexts { self: Analyzer => // SI-8245 `isLazy` need to skip lazy getters to ensure `return` binds to the right place c.enclMethod = if (isDefDef && !owner.isLazy) c else enclMethod + if (tree != outer.tree) c(TypeConstructorAllowed) = false + registerContext(c.asInstanceOf[analyzer.Context]) debuglog("[context] ++ " + c.unit + " / " + tree.summaryString) c |