Files
swift-mirror/test/SIL/if_clause_printing.swift
Erik Eckstein ad070165c8 Don't print AST if-clauses when emitting SIL.
It's not required and also this crashed while emitting the SIL of the stdlib build.
2018-02-16 12:22:47 -08:00

21 lines
387 B
Swift

// RUN: %target-swift-frontend -emit-sil %s | %FileCheck %s
// Check that we don't crash when trying to print an inactive if-clause.
// CHECK: struct TestStruct
// CHECK-NEXT: internal enum TheRealOne
// CHECK-NEXT: case B
struct TestStruct {
#if abc
internal enum Unused {
case A(AnyObject)
}
#else
internal enum TheRealOne {
case B(AnyObject)
}
#endif
}