mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
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
8 lines
126 B
Swift
8 lines
126 B
Swift
// RUN: %target-swift-frontend %s -emit-silgen
|
|
|
|
struct Boom: Decodable {}
|
|
|
|
enum Whiz: Decodable {
|
|
case bang(_ boom: Boom)
|
|
}
|