diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-04-15 12:49:18 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-04-15 12:49:18 +0200 |
commit | d3adfd7f40708899aa033ea1e5c56d468ff9495c (patch) | |
tree | c60b03c6f63d3be0424b883a96d9a8a49e8bbc77 /src | |
parent | 0aa3f4cecfff4a2c883a5b814c551f399dc425e1 (diff) | |
download | dotty-d3adfd7f40708899aa033ea1e5c56d468ff9495c.tar.gz dotty-d3adfd7f40708899aa033ea1e5c56d468ff9495c.tar.bz2 dotty-d3adfd7f40708899aa033ea1e5c56d468ff9495c.zip |
Fix Nullarify treating all 'apply' methods as Function0
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/transform/Nullarify.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/Nullarify.scala b/src/dotty/tools/dotc/transform/Nullarify.scala index 8ca41c07f..664b4bee1 100644 --- a/src/dotty/tools/dotc/transform/Nullarify.scala +++ b/src/dotty/tools/dotc/transform/Nullarify.scala @@ -49,7 +49,7 @@ class Nullarify extends TreeTransform with InfoTransformer { def transformArg(arg: Tree, formal: Type): Tree = formal match { case _: ExprType => arg match { - case Apply(Select(qual, nme.apply), Nil) => qual + case Apply(Select(qual, nme.apply), Nil) if qual.tpe <:< defn.FunctionClass(0).typeRef => qual case _ => val meth = ctx.newSymbol(ctx.owner, nme.ANON_FUN, Synthetic, MethodType(Nil, Nil, arg.tpe.widen)) |