Files
swift-mirror/test/Macros/delayed_parsing.swift
Slava Pestov 9d85221ae5 Parse: Save and restore InFreestandingMacroArgument when delayed parsing
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
2024-10-24 17:19:50 -04:00

869 B