Files
swift-mirror/test/Index/rdar129065620.swift
Hamish Knight d98cb9e2b3 [Mangler] Mangle function type for invalid enum element
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
2024-06-11 21:24:11 +01:00

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 {}
}