mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL files still require this behavior; if we cleaned that up we could simplify a fair bit of code here. Fixes <https://bugs.swift.org/browse/SR-284>, <https://bugs.swift.org/browse/SR-4426>.
21 lines
292 B
Swift
21 lines
292 B
Swift
// RUN: %target-typecheck-verify-swift
|
|
|
|
// https://bugs.swift.org/browse/SR-4426
|
|
// '#if' in top-level code that contains only decls should not disturb forward reference.
|
|
|
|
typealias A = B
|
|
|
|
#if false
|
|
func foo() {}
|
|
#endif
|
|
|
|
struct B {}
|
|
|
|
typealias C = D
|
|
|
|
#if true
|
|
print("ok")
|
|
#endif
|
|
|
|
struct D {}
|