File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 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 {
10831083 private val InlinedCalls = new Property .Key [List [Tree ]]
10841084
10851085 /** 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.
10871088 */
10881089 override def inlineContext (call : Tree )(implicit ctx : Context ): Context = {
10891090 // We assume enclosingInlineds is already normalized, and only process the new call with the head.
10901091 val oldIC = enclosingInlineds
10911092 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
10931096 case _ => call :: oldIC
10941097 }
10951098 ctx.fresh.setProperty(InlinedCalls , newIC)
You can’t perform that action at this time.
0 commit comments