Files
swift-mirror/validation-test/compiler_crashers_2_fixed/rdar86339848.swift
Robert Widmann 6f68210fb2 Use the API Name of Enum Parameters to Determine Coding Keys
Covers a missing case in codable synthesis for enums with argument
payloads that have internal and external labels. When the name of the
var decl is used, the internal name of the parameter becomes the key
instead of the API name. In this case, this causes an invalid reference
to an enum case with the internal name as an argument to be synthesized
in the derived Decodable conformance which (hopefully) crashes
downstream.

rdar://86339848
2021-12-16 13:02:35 -08:00

8 lines
126 B
Swift

// RUN: %target-swift-frontend %s -emit-silgen
struct Boom: Decodable {}
enum Whiz: Decodable {
case bang(_ boom: Boom)
}