mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
When parsing #if...#endif regions, parse the active clause directly into place in the AST without ever producing an IfConfigDecl instance.
29 lines
454 B
Swift
29 lines
454 B
Swift
// Copyright (c) 452 Attila the Hun. All rights reserved.
|
|
// Blah Blah.
|
|
|
|
// More blah blah.
|
|
|
|
import Swift
|
|
|
|
#if FOO
|
|
class FooEnabled {}
|
|
|
|
typealias MyN = Int
|
|
#else
|
|
class FooDisabled {}
|
|
|
|
typealias MyN = Int
|
|
#endif
|
|
|
|
public class MyClass {
|
|
func doit(x: Int) {}
|
|
#if FOO
|
|
func doFooEnabled() {}
|
|
#else
|
|
func doFooDisabled() {}
|
|
#endif
|
|
}
|
|
|
|
// RUN: %target-swift-ide-test -print-swift-file-interface -source-filename %s > %t.out
|
|
// RUN: diff -u %s.result %t.out
|