diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-12-07 15:39:51 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-12-07 15:39:51 +0100 |
commit | 0f3f635d30551b1b96c64b955a85a3e535d1f2d2 (patch) | |
tree | 03b35095a9793774caa9f7c0910bdba76eb4a4e6 /src | |
parent | ee1c02b374a4b8a053e9a8b14af5e205afa67e14 (diff) | |
download | scala-0f3f635d30551b1b96c64b955a85a3e535d1f2d2.tar.gz scala-0f3f635d30551b1b96c64b955a85a3e535d1f2d2.tar.bz2 scala-0f3f635d30551b1b96c64b955a85a3e535d1f2d2.zip |
SI-10072 cast Function nodes to environment in specialization
This commit basically make sure the fix for SI-5284 works correctly when
a Function node reaches specialization (`-Ydealmbdafy:method` and
IndyLambda are default in 2.12.x). To understand it, best read the
excellent description in b29c01b.
The code that's removed in this commit was added in 13ea590. It
prevented `castType` from being invoked on the `Function` node, which
is exactly what is needed here. It's also what happens under
`-Ydelambdafy:inline`, the `new anonfun()` tree is being casted from
`(Int, Int) => Int` to `(Int, A) => Int`.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Duplicators.scala | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala index df014b5161..ea82739504 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala @@ -240,10 +240,6 @@ abstract class Duplicators extends Analyzer { result.symbol.updateAttachment(DelambdafyTarget) result - case fun: Function => - debuglog("Clearing the type and retyping Function: " + fun) - super.typed(fun.clearType, mode, pt) - case vdef @ ValDef(mods, name, tpt, rhs) => // log("vdef fixing tpe: " + tree.tpe + " with sym: " + tree.tpe.typeSymbol + " and " + invalidSyms) //if (mods.hasFlag(Flags.LAZY)) vdef.symbol.resetFlag(Flags.MUTABLE) // Martin to Iulian: lazy vars can now appear because they are no longer boxed; Please check that deleting this statement is OK. |