Skip to content
ZOLO / TE213 Type · error

invalid or heterogeneous syntax spread

A `${..values}` spread received something other than a list or tuple of syntax nodes from one compatible category.

Why this fires

A ${..values} spread did not receive a list or tuple of syntax nodes, or the collection mixed incompatible syntax categories. Spreads are structural: a member list may contain Syntax<.Member>, but not expressions or plain strings.

Fix it

Map each source value to the same quote category before spreading it.

let methods = info.fields.map(|field| {
  return quote member { fn generated(self) {} }
})
return quote items { impl ${info.ref} { ${..methods} } }

Global index

Find your way through Zolo

Try an idea

Start here

9 results

9 results

enespt-br