aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-12-03 19:32:09 +0100
committerMartin Odersky <odersky@gmail.com>2016-12-17 18:34:27 +0100
commit4fb19e43f696845a18cbe2a7671654674ffce9b7 (patch)
treeeaa6abbcaf7966041f2e10f1d7840d4f4ca1c6a9 /compiler/src/dotty/tools/dotc/typer/Typer.scala
parentad7edc7bd8af963b768afdc50b7038a8daa47ccb (diff)
downloaddotty-4fb19e43f696845a18cbe2a7671654674ffce9b7.tar.gz
dotty-4fb19e43f696845a18cbe2a7671654674ffce9b7.tar.bz2
dotty-4fb19e43f696845a18cbe2a7671654674ffce9b7.zip
Refactor function operations in Definitions
Also: show implicit function types correctly. Also: refine applications of implicit funcitons - don't do it for closure trees - don't do it after typer.
Diffstat (limited to 'compiler/src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--compiler/src/dotty/tools/dotc/typer/Typer.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/src/dotty/tools/dotc/typer/Typer.scala b/compiler/src/dotty/tools/dotc/typer/Typer.scala
index 018a6064b..e016ba3a6 100644
--- a/compiler/src/dotty/tools/dotc/typer/Typer.scala
+++ b/compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1880,8 +1880,10 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
missingArgs
case wtp: RefinedType
if defn.isImplicitFunctionClass(wtp.underlyingClassRef(refinementOK = false).classSymbol) &&
- !isApplyProto(pt) =>
- typr.println(i"insert apply on implicit $tree")
+ !isClosure(tree) &&
+ !isApplyProto(pt) &&
+ !ctx.isAfterTyper =>
+ typr.println("insert apply on implicit $tree")
typed(untpd.Select(untpd.TypedSplice(tree), nme.apply), pt)
case _ =>
ctx.typeComparer.GADTused = false