mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[ModuleInterface] Add printing for new attributes
Specially print @_hasMissingDesignatedInitializers and @_inheritsConvenienceInitializers in module interfaces Fixes rdar://51249311
This commit is contained in:
committed by
Robert Widmann
parent
283854a012
commit
511db0c90a
21
test/ModuleInterface/non-public-designated-inits.swift
Normal file
21
test/ModuleInterface/non-public-designated-inits.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
// Note: This test has a client: non-public-designated-inits-client.swift
|
||||
|
||||
// RUN: %empty-directory(%t)
|
||||
|
||||
// RUN: %target-swift-frontend -typecheck %s -emit-module-interface-path %t/Module.swiftinterface -module-name Module -enable-library-evolution
|
||||
// RUN: %FileCheck %s < %t/Module.swiftinterface
|
||||
|
||||
// CHECK: @_hasMissingDesignatedInitializers open class A {
|
||||
open class A {
|
||||
// This is a non-public designated init, which means the convenience
|
||||
// init should not be inheritable.
|
||||
init() {}
|
||||
|
||||
// CHECK-NEXT: public init(_: Swift.Int)
|
||||
public init(_: Int) {}
|
||||
|
||||
// CHECK-NEXT: convenience public init(hi: ())
|
||||
public convenience init(hi: ()) { self.init() }
|
||||
|
||||
// CHECK: }
|
||||
}
|
||||
Reference in New Issue
Block a user