aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer/Inliner.scala
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2016-11-07 13:12:26 +0100
committerFelix Mulder <felix.mulder@gmail.com>2016-11-07 14:05:47 +0100
commit1fec582b4e85de715e92ccb621ac55e02874558e (patch)
tree6fde544794cb073ba8690b4b7e46162ce902c951 /src/dotty/tools/dotc/typer/Inliner.scala
parent98c6a0342f2903f8cbaf34e0f9a13be40916c7b4 (diff)
downloaddotty-1fec582b4e85de715e92ccb621ac55e02874558e.tar.gz
dotty-1fec582b4e85de715e92ccb621ac55e02874558e.tar.bz2
dotty-1fec582b4e85de715e92ccb621ac55e02874558e.zip
Inline iff reporter has no new errors post typing `rhs`
Diffstat (limited to 'src/dotty/tools/dotc/typer/Inliner.scala')
-rw-r--r--src/dotty/tools/dotc/typer/Inliner.scala5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/typer/Inliner.scala b/src/dotty/tools/dotc/typer/Inliner.scala
index 72a0158a5..6499167ad 100644
--- a/src/dotty/tools/dotc/typer/Inliner.scala
+++ b/src/dotty/tools/dotc/typer/Inliner.scala
@@ -190,10 +190,7 @@ object Inliner {
val inlineCtx = ctx
sym.updateAnnotation(LazyBodyAnnotation { _ =>
implicit val ctx: Context = inlineCtx
- val tree1 = treeExpr(ctx)
- if (tree1.hasType && !tree1.tpe.isError)
- makeInlineable(tree1)
- else tree1
+ ctx.withNoError(treeExpr(ctx))(makeInlineable)
})
}
}