@@ -72,6 +72,44 @@ public struct LargeStruct {
72
72
// CHECK-NEXT: });
73
73
// CHECK-NEXT: }
74
74
75
+ public final class PropertiesInClass {
76
+ public let storedInt : Int32
77
+
78
+ init ( _ x: Int32 ) {
79
+ storedInt = x
80
+ }
81
+
82
+ public var computedInt : Int {
83
+ return Int ( storedInt) - 1
84
+ }
85
+
86
+ public var smallStruct : FirstSmallStruct {
87
+ return FirstSmallStruct ( x: UInt32 ( - storedInt) ) ;
88
+ }
89
+ }
90
+
91
+ // CHECK: class PropertiesInClass final : public swift::_impl::RefCountedClass {
92
+ // CHECK: using RefCountedClass::operator=;
93
+ // CHECK-NEXT: inline int32_t getStoredInt();
94
+ // CHECK-NEXT: inline swift::Int getComputedInt();
95
+ // CHECK-NEXT: inline FirstSmallStruct getSmallStruct();
96
+
97
+ // CHECK: inline int32_t PropertiesInClass::getStoredInt() {
98
+ // CHECK-NEXT: return _impl::$s10Properties0A7InClassC9storedInts5Int32Vvg(::swift::_impl::_impl_RefCountedClass::getOpaquePointer(*this));
99
+ // CHECK-NEXT: }
100
+ // CHECK-NEXT: inline swift::Int PropertiesInClass::getComputedInt() {
101
+ // CHECK-NEXT: return _impl::$s10Properties0A7InClassC11computedIntSivg(::swift::_impl::_impl_RefCountedClass::getOpaquePointer(*this));
102
+ // CHECK-NEXT: }
103
+ // CHECK-NEXT: inline FirstSmallStruct PropertiesInClass::getSmallStruct() {
104
+ // CHECK-NEXT: return _impl::_impl_FirstSmallStruct::returnNewValue([&](char * _Nonnull result) {
105
+ // CHECK-NEXT: _impl::swift_interop_returnDirect_Properties_FirstSmallStruct(result, _impl::$s10Properties0A7InClassC11smallStructAA010FirstSmallE0Vvg(::swift::_impl::_impl_RefCountedClass::getOpaquePointer(*this)));
106
+ // CHECK-NEXT: });
107
+ // CHECK-NEXT: }
108
+
109
+ public func createPropsInClass( _ x: Int32 ) -> PropertiesInClass {
110
+ return PropertiesInClass ( x)
111
+ }
112
+
75
113
public struct SmallStructWithGetters {
76
114
public let storedInt : UInt32
77
115
public var computedInt : Int {
0 commit comments