mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Previously we would mangle a single ErrorType as the type for the element, but that would fail to demangle since we expect a function type. Use the same logic as AbstractFunctionDecl, mangling a function type of ErrorType. While here, also handle SubscriptDecls and check for error types rather than `isInvalid()`. rdar://129065620
13 lines
287 B
Swift
13 lines
287 B
Swift
// RUN: %empty-directory(%t)
|
|
// RUN: not %target-swift-frontend -typecheck %s -index-store-path %t
|
|
|
|
// rdar://129065620 - Make sure we don't crash when verifying the mangling.
|
|
enum Foo {
|
|
case bar(id: UInt32)
|
|
case bar(id: UInt32)
|
|
}
|
|
|
|
struct S {
|
|
subscript(x: Invalid) -> Invalid {}
|
|
}
|