mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
But disable roundtrip/validation testing. So that macro expansions are correctly performed in code completion, but avoid an assertion failure caused by existence of null character in the source buffer. rdar://107900870
30 lines
1.5 KiB
Swift
30 lines
1.5 KiB
Swift
// REQUIRES: swift_swift_parser
|
|
// RUN: %empty-directory(%t)
|
|
// RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t -plugin-path %swift-host-lib-dir/plugins
|
|
|
|
@OptionSet<UInt8>
|
|
struct ShippingOptions {
|
|
private enum Options: Int {
|
|
case nextDay
|
|
case secondDay
|
|
case priority
|
|
case standard
|
|
}
|
|
}
|
|
|
|
func foo() {
|
|
ShippingOptions.#^MEMBER_STATIC^#
|
|
}
|
|
|
|
// MEMBER_STATIC: Keyword[self]/CurrNominal: self[#ShippingOptions.Type#]; name=self
|
|
// MEMBER_STATIC: Decl[TypeAlias]/CurrNominal: RawValue[#UInt8#]; name=RawValue
|
|
// MEMBER_STATIC: Decl[Constructor]/CurrNominal: init({#rawValue: ShippingOptions.RawValue#})[#ShippingOptions#]; name=init(rawValue:)
|
|
// MEMBER_STATIC: Decl[StaticVar]/CurrNominal: nextDay[#ShippingOptions#]; name=nextDay
|
|
// MEMBER_STATIC: Decl[StaticVar]/CurrNominal: secondDay[#ShippingOptions#]; name=secondDay
|
|
// MEMBER_STATIC: Decl[StaticVar]/CurrNominal: priority[#ShippingOptions#]; name=priority
|
|
// MEMBER_STATIC: Decl[StaticVar]/CurrNominal: standard[#ShippingOptions#]; name=standard
|
|
// MEMBER_STATIC: Decl[TypeAlias]/CurrNominal: Element[#ShippingOptions#]; name=Element
|
|
// MEMBER_STATIC: Decl[TypeAlias]/CurrNominal: ArrayLiteralElement[#ShippingOptions#]; name=ArrayLiteralElement
|
|
// MEMBER_STATIC: Decl[Constructor]/Super/IsSystem: init()[#ShippingOptions#]; name=init()
|
|
// MEMBER_STATIC: Decl[Constructor]/Super/IsSystem: init({#(sequence): Sequence#})[#ShippingOptions#]; name=init(:)
|