Skip to content

Commit 0808e16

Browse files
committed
Merge pull request #1912 from jckarter/SR-1025
Regression test for SR-1025.
2 parents 6723560 + ac97bc6 commit 0808e16

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/SILGen/objc_extensions.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,16 @@ extension SubSub {
5757
}
5858
}
5959
}
60+
61+
// SR-1025
62+
extension Base {
63+
private static var x = 1
64+
}
65+
66+
// CHECK-LABEL: sil hidden @_TF15objc_extensions19testStaticVarAccessFT_T_
67+
func testStaticVarAccess() {
68+
// CHECK: [[F:%.*]] = function_ref @_TFE15objc_extensionsCSo4BaseauP33_1F05E59585E0BB585FCA206FBFF1A92D1xSi
69+
// CHECK: [[PTR:%.*]] = apply [[F]]()
70+
// CHECK: [[ADDR:%.*]] = pointer_to_address [[PTR]]
71+
_ = Base.x
72+
}

0 commit comments

Comments
 (0)