mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Closures appearing in freestanding macro arguments don't have discriminators assigned, since we don't actually emit them. Similarly we skip recording opaque return types that appear in macro arguments, since they don't get emitted. However this logic didn't take delayed parsing into account, which must save and restore the InFreestandingMacroArgument bit correctly. As a result, if the freestanding macro argument contained a closure which contained a local function with a declaration that has an opaque return type, we would crash in serialization from attempting to mangle an opaque return type nested inside of a closure without a discriminator. Fixes rdar://135445004
869 B
869 B