mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add new `-print-ast-decl` frontend option for only printing declarations, to match existing behavior. Some tests want to print the AST, but don't care about expressions. The existing `-print-ast` option now prints function bodies and expressions. Not all expressions are printed yet, but most common ones are.
11 lines
424 B
Swift
11 lines
424 B
Swift
// RUN: %target-swift-frontend -print-ast-decl %s 2>&1 | %FileCheck %s
|
|
|
|
// Check that synthesized members show up as 'fileprivate', not 'private.
|
|
|
|
// CHECK-LABEL: private struct PrivateConformer : Hashable {
|
|
private struct PrivateConformer: Hashable {
|
|
var value: Int
|
|
// CHECK-DAG: fileprivate var hashValue: Int { get }
|
|
// CHECK-DAG: @_implements(Equatable, ==(_:_:)) fileprivate static func __derived_struct_equals
|
|
}
|