summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@typesafe.com>2015-03-26 13:16:49 +0100
committerLukas Rytz <lukas.rytz@typesafe.com>2015-03-26 13:16:49 +0100
commit439b3eb6a733cd0a274c7d5498d918bce946f8d3 (patch)
tree8723a4aea694c1d4fcaf6464c2586839b033a387 /src/compiler
parent4a3e9372363194560bbe0c04aec2108953ea89dd (diff)
parentbb7f2b8d98243c2d67ff1835fcfb1df5dbea9bb6 (diff)
downloadscala-439b3eb6a733cd0a274c7d5498d918bce946f8d3.tar.gz
scala-439b3eb6a733cd0a274c7d5498d918bce946f8d3.tar.bz2
scala-439b3eb6a733cd0a274c7d5498d918bce946f8d3.zip
Merge pull request #4358 from xeno-by/topic/names-defaults
better errors for macro applications with wrong number of arguments
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
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 d23b50c3eb..598f1f3c93 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -3387,7 +3387,6 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
// defaults are needed. they are added to the argument list in named style as
// calls to the default getters. Example:
// foo[Int](a)() ==> foo[Int](a)(b = foo$qual.foo$default$2[Int](a))
- checkNotMacro()
// SI-8111 transformNamedApplication eagerly shuffles around the application to preserve
// evaluation order. During this process, it calls `changeOwner` on symbols that
@@ -3434,6 +3433,7 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
duplErrTree
} else if (lencmp2 == 0) {
// useful when a default doesn't match parameter type, e.g. def f[T](x:T="a"); f[Int]()
+ checkNotMacro()
context.diagUsedDefaults = true
doTypedApply(tree, if (blockIsEmpty) fun else fun1, allArgs, mode, pt)
} else {