From 49efae02d94f4a4b4439114be118b836705a3716 Mon Sep 17 00:00:00 2001 From: Ruslan Shevchenko Date: Tue, 21 Jan 2020 22:49:55 +0200 Subject: [PATCH 1/2] fixed lampepfl/dotty#8029 --- compiler/src/dotty/tools/dotc/ast/tpd.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/ast/tpd.scala b/compiler/src/dotty/tools/dotc/ast/tpd.scala index c04995df70a9..c3441b52fcc0 100644 --- a/compiler/src/dotty/tools/dotc/ast/tpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/tpd.scala @@ -42,8 +42,12 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { Super(qual, if (mixName.isEmpty) untpd.EmptyTypeIdent else untpd.Ident(mixName), inConstrCall, mixinClass) def Apply(fn: Tree, args: List[Tree])(implicit ctx: Context): Apply = { - assert(fn.isInstanceOf[RefTree] || fn.isInstanceOf[GenericApply[_]]) - ta.assignType(untpd.Apply(fn, args), fn, args) + fn match { + case Inlined(o,b,e) => Apply(e,args) + case _ => + assert(fn.isInstanceOf[RefTree] || fn.isInstanceOf[GenericApply[_]]) + ta.assignType(untpd.Apply(fn, args), fn, args) + } } def TypeApply(fn: Tree, args: List[Tree])(implicit ctx: Context): TypeApply = { From 1d39644724d851631831e7d31fd8384371be23ef Mon Sep 17 00:00:00 2001 From: Ruslan Shevchenko Date: Tue, 21 Jan 2020 23:13:24 +0200 Subject: [PATCH 2/2] allow inlined to fix https://github.com/lampepfl/dotty/issues/8029 --- compiler/src/dotty/tools/dotc/ast/tpd.scala | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/compiler/src/dotty/tools/dotc/ast/tpd.scala b/compiler/src/dotty/tools/dotc/ast/tpd.scala index c3441b52fcc0..21ce73ee9a97 100644 --- a/compiler/src/dotty/tools/dotc/ast/tpd.scala +++ b/compiler/src/dotty/tools/dotc/ast/tpd.scala @@ -42,12 +42,8 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo { Super(qual, if (mixName.isEmpty) untpd.EmptyTypeIdent else untpd.Ident(mixName), inConstrCall, mixinClass) def Apply(fn: Tree, args: List[Tree])(implicit ctx: Context): Apply = { - fn match { - case Inlined(o,b,e) => Apply(e,args) - case _ => - assert(fn.isInstanceOf[RefTree] || fn.isInstanceOf[GenericApply[_]]) - ta.assignType(untpd.Apply(fn, args), fn, args) - } + assert(fn.isInstanceOf[RefTree] || fn.isInstanceOf[GenericApply[_]] || fn.isInstanceOf[Inlined]) + ta.assignType(untpd.Apply(fn, args), fn, args) } def TypeApply(fn: Tree, args: List[Tree])(implicit ctx: Context): TypeApply = {