aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Typer.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-09-15 15:33:22 +0200
committerMartin Odersky <odersky@gmail.com>2016-10-02 16:12:28 +0200
commitc9fa504161cc34ec979ae3c1b73db6798adc4872 (patch)
tree6415c633019d0b7d8730ee00b375fb4af076085a /src/dotty/tools/dotc/typer/Typer.scala
parent748d1d852ce28785f61f511758071c70a6137356 (diff)
downloaddotty-c9fa504161cc34ec979ae3c1b73db6798adc4872.tar.gz
dotty-c9fa504161cc34ec979ae3c1b73db6798adc4872.tar.bz2
dotty-c9fa504161cc34ec979ae3c1b73db6798adc4872.zip
Inline function parameters
Add inline function parameters. The previous concept of inlineable closure is adapted to coincide with an inline function parameter.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Typer.scala5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala
index 18b609f8d..4c7d1c50d 100644
--- a/src/dotty/tools/dotc/typer/Typer.scala
+++ b/src/dotty/tools/dotc/typer/Typer.scala
@@ -745,10 +745,7 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit
case WildcardType(_) => untpd.TypeTree()
case _ => untpd.TypeTree(protoResult)
}
- val inlineable = fnBody match {
- case Apply(untpd.TypedSplice(fn), _) => Inliner.hasBodyToInline(fn.symbol)
- case _ => false
- }
+ val inlineable = pt.hasAnnotation(defn.InlineParamAnnot)
desugar.makeClosure(inferredParams, fnBody, resultTpt, inlineable)
}
typed(desugared, pt)