diff options
author | Martin Odersky <odersky@gmail.com> | 2016-09-04 18:41:22 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-10-02 16:11:21 +0200 |
commit | 9a48e7bc56979c5968149e6aabdae96d33681a60 (patch) | |
tree | 64f8f6696a7665c8f64eaa5fa0ee307be8e70295 /src/dotty/tools/dotc/typer/Typer.scala | |
parent | be53234352f75aca456ed131163b45230e4638af (diff) | |
download | dotty-9a48e7bc56979c5968149e6aabdae96d33681a60.tar.gz dotty-9a48e7bc56979c5968149e6aabdae96d33681a60.tar.bz2 dotty-9a48e7bc56979c5968149e6aabdae96d33681a60.zip |
Don't inline after typer.
Safety measure: Inline only during typer, not when code
is generated in later phases.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Typer.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Typer.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/typer/Typer.scala b/src/dotty/tools/dotc/typer/Typer.scala index 09259b361..3672996c8 100644 --- a/src/dotty/tools/dotc/typer/Typer.scala +++ b/src/dotty/tools/dotc/typer/Typer.scala @@ -1793,7 +1793,9 @@ class Typer extends Namer with TypeAssigner with Applications with Implicits wit tree } else if (tree.tpe <:< pt) - if (tree.symbol.isInlineMethod && !ctx.owner.ownersIterator.exists(_.isInlineMethod)) + if (tree.symbol.isInlineMethod && + !ctx.owner.ownersIterator.exists(_.isInlineMethod) && + !ctx.isAfterTyper) adapt(Inliner.inlineCall(tree, pt), pt) else if (ctx.typeComparer.GADTused && pt.isValueType) // Insert an explicit cast, so that -Ycheck in later phases succeeds. |