TextualInterface: print __conuming before accessors

rdar://80535144
This commit is contained in:
Xi Ge
2021-07-15 13:31:46 -07:00
parent 8226e5470f
commit 3ab9ddfa6d
2 changed files with 30 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
// RUN: %empty-directory(%t)
// RUN: %empty-directory(%t/missing)
// RUN: %empty-directory(%t/inputs)
// RUN: %target-swift-frontend -emit-module-path %t/missing/Foo.swiftmodule -enable-library-evolution -emit-module-interface-path %t/inputs/Foo.swiftinterface -enable-objc-interop -disable-objc-attr-requires-foundation-module -module-name Foo %s
// RUN: %FileCheck --input-file %t/inputs/Foo.swiftinterface %s
// RUN: touch %t/Bar.swift
// RUN: echo "import Foo" > %t/Bar.swift
// RUN: echo "let f = Field()" >> %t/Bar.swift
// RUN: %target-swift-frontend -emit-module-path %t/Bar.swiftmodule -enable-library-evolution -enable-objc-interop -disable-objc-attr-requires-foundation-module -module-name Bar %t/Bar.swift -I %t/inputs
import Swift
public struct Field {
public init() {}
public var area: Int {
__consuming get { return 1 }
_modify {
var a = 1
yield &a
}
}
}
// CHECK: __consuming get