aboutsummaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-02-02 21:52:33 +1100
committerGitHub <noreply@github.com>2017-02-02 21:52:33 +1100
commitea70ff821c8694186bc7e736a1bcb663baa88cf5 (patch)
tree86b876fc59a6740087e89007b638e6ed0ae9fc92 /compiler
parentb45aad5da773dddfc8c449a85d5b6d6a21d0a071 (diff)
parent92ab901869e110a2fe436bca793578d640b9def3 (diff)
downloaddotty-ea70ff821c8694186bc7e736a1bcb663baa88cf5.tar.gz
dotty-ea70ff821c8694186bc7e736a1bcb663baa88cf5.tar.bz2
dotty-ea70ff821c8694186bc7e736a1bcb663baa88cf5.zip
Merge pull request #1928 from dotty-staging/fix-#1569
Fix #1569: Fix logic for by-name parameters of inline methods
Diffstat (limited to 'compiler')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Inliner.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Inliner.scala b/compiler/src/dotty/tools/dotc/typer/Inliner.scala
index 09487570d..cfc0003c6 100644
--- a/compiler/src/dotty/tools/dotc/typer/Inliner.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Inliner.scala
@@ -327,7 +327,7 @@ class Inliner(call: tpd.Tree, rhs: tpd.Tree)(implicit ctx: Context) {
(tp.paramNames, tp.paramTypes, argss.head).zipped.foreach { (name, paramtp, arg) =>
def isByName = paramtp.dealias.isInstanceOf[ExprType]
paramBinding(name) = arg.tpe.stripAnnots.stripTypeVar match {
- case argtpe: SingletonType if isByName || isIdempotentExpr(arg) => argtpe
+ case argtpe: SingletonType if isIdempotentExpr(arg) => argtpe
case argtpe =>
val inlineFlag = if (paramtp.hasAnnotation(defn.InlineParamAnnot)) Inline else EmptyFlags
val (bindingFlags, bindingType) =