mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This comes up when an imported error enum has duplicate cases. The FooError.Code enum has an alias for the duplicate case, and the wrapper type FooError defines aliases for every member of FooError.Code. The implementation of importEnumCaseAlias() assumed that 'original' was an EnumElementDecl, and built AST accordingly; however if it is a 'VarDecl', we have to build a MemberRefExpr instead. This regression was introduced in https://github.com/apple/swift/pull/25009. Fixes <rdar://problem/58552618>.
11 lines
385 B
Swift
11 lines
385 B
Swift
// RUN: %target-swift-frontend(mock-sdk: %clang-importer-sdk) -emit-sil %s -enable-objc-interop -I %S/Inputs/custom-modules/AliasCaseErrorEnum
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import AliasCaseErrorEnum
|
|
|
|
// Make sure that we can reference aliases defined in the wrapper type
|
|
// which themselves point at aliases inside the nested 'Code' type.
|
|
|
|
_ = AliasError.realName
|
|
_ = AliasError.fakeName |