diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-03-26 13:16:49 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2015-03-26 13:16:49 +0100 |
commit | 439b3eb6a733cd0a274c7d5498d918bce946f8d3 (patch) | |
tree | 8723a4aea694c1d4fcaf6464c2586839b033a387 /src | |
parent | 4a3e9372363194560bbe0c04aec2108953ea89dd (diff) | |
parent | bb7f2b8d98243c2d67ff1835fcfb1df5dbea9bb6 (diff) | |
download | scala-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')
-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 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 { |