mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
fix missing effects specifiers on eff props in swiftinterface
I missed the case where the body is also being printed in the interface file.
This commit is contained in:
34
test/ModuleInterface/effectful_properties.swift
Normal file
34
test/ModuleInterface/effectful_properties.swift
Normal file
@@ -0,0 +1,34 @@
|
||||
// RUN: %target-swift-frontend -enable-experimental-concurrency -typecheck -swift-version 5 -enable-library-evolution -emit-module-interface-path %t.swiftinterface %s -module-name EffProps
|
||||
// RUN: %FileCheck %s < %t.swiftinterface
|
||||
|
||||
public struct MyStruct {}
|
||||
|
||||
// CHECK-LABEL: public var status
|
||||
// CHECK: get async throws
|
||||
|
||||
public extension MyStruct {
|
||||
struct InnerStruct {
|
||||
public var status: Bool { get async throws { false } }
|
||||
}
|
||||
}
|
||||
|
||||
// CHECK-LABEL: public var hello
|
||||
// CHECK: get async
|
||||
|
||||
// CHECK-LABEL: public subscript
|
||||
// CHECK: get async throws
|
||||
|
||||
public class C {
|
||||
public var hello: Int { get async { 0 } }
|
||||
|
||||
public subscript(_ x: Int) -> Void {
|
||||
get async throws { }
|
||||
}
|
||||
}
|
||||
|
||||
// CHECK-LABEL: public var world
|
||||
// CHECK: get throws
|
||||
|
||||
public enum E {
|
||||
public var world: Int { get throws { 0 } }
|
||||
}
|
||||
Reference in New Issue
Block a user