diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-02-03 12:56:52 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-02-03 12:56:52 +0100 |
commit | 92dce69d5d91d6040b106230827bf7c4f07aea51 (patch) | |
tree | 2a58a4eecb106224055beea0583afaa4f44b5837 /src/compiler | |
parent | b6058387007f0326009737fa29747ffbc322447c (diff) | |
parent | c30ed29f6cee9d4e0bd4a99c4be804ffcb20d281 (diff) | |
download | scala-92dce69d5d91d6040b106230827bf7c4f07aea51.tar.gz scala-92dce69d5d91d6040b106230827bf7c4f07aea51.tar.bz2 scala-92dce69d5d91d6040b106230827bf7c4f07aea51.zip |
Merge pull request #4260 from retronym/ticket/9093
SI-9093 Fix value discarding / multiple param list crasher
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index e6fa9a0142..9773028b76 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1177,7 +1177,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper } def instantiatePossiblyExpectingUnit(tree: Tree, mode: Mode, pt: Type): Tree = { - if (mode.typingExprNotFun && pt.typeSymbol == UnitClass) + if (mode.typingExprNotFun && pt.typeSymbol == UnitClass && !tree.tpe.isInstanceOf[MethodType]) instantiateExpectingUnit(tree, mode) else instantiate(tree, mode, pt) |