Skip to content

Commit e787906

Browse files
jrose-applebob-wilson
authored andcommitted
[test] Update ClangImporter/enum-anon.swift for Clang improvements (#20804)
We previously weren't able to import something properly, but now it's working because of some change in Clang. Let's take it! rdar://problem/46263312
1 parent 0dda766 commit e787906

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/ClangImporter/enum-anon.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ func testDiags() {
2222

2323
let _: String = SR2511().y // expected-error {{cannot convert value of type 'UInt32' to specified type 'String'}}
2424

25-
// FIXME: This constant doesn't seem to be imported at all. At least one of
26-
// the following two names should work.
27-
let _: String = SR2511B // expected-error {{use of unresolved identifier 'SR2511B'}}
25+
// The nested anonymous enum value should still have top-level scope, because
26+
// that's how C works. It should also have the same type as the field (above).
27+
let _: String = SR2511B // expected-error {{cannot convert value of type 'UInt32' to specified type 'String'}}
2828
let _: String = SR2511.SR2511B // expected-error {{type 'SR2511' has no member 'SR2511B'}}
2929
}
3030
#endif

0 commit comments

Comments
 (0)