File tree 1 file changed +5
-2
lines changed
compiler/src/dotty/tools/dotc/ast
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1083,13 +1083,16 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
1083
1083
private val InlinedCalls = new Property .Key [List [Tree ]]
1084
1084
1085
1085
/** Record an enclosing inlined call.
1086
- * EmptyTree calls (for parameters) cancel the next-enclosing non-empty call in the list
1086
+ * EmptyTree calls (for parameters) cancel the next-enclosing call in the list instead of being added to it.
1087
+ * We assume parameters are never nested inside parameters.
1087
1088
*/
1088
1089
override def inlineContext (call : Tree )(implicit ctx : Context ): Context = {
1089
1090
// We assume enclosingInlineds is already normalized, and only process the new call with the head.
1090
1091
val oldIC = enclosingInlineds
1091
1092
val newIC = (call, oldIC) match {
1092
- case (t, ts1 @ (t1 :: ts2)) if t.isEmpty => if (t1.isEmpty) ts1 else ts2
1093
+ case (t, t1 :: ts2) if t.isEmpty =>
1094
+ assert(! t1.isEmpty)
1095
+ ts2
1093
1096
case _ => call :: oldIC
1094
1097
}
1095
1098
ctx.fresh.setProperty(InlinedCalls , newIC)
You can’t perform that action at this time.
0 commit comments