We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 998dea2 commit 0c130a9Copy full SHA for 0c130a9
test/Unsafe/safe.swift
@@ -185,7 +185,8 @@ struct MyArray<Element> {
185
}
186
187
extension UnsafeBufferPointer {
188
- @safe var safeCount: Int { unsafe count }
+ @unsafe var unsafeCount: Int { 17 }
189
+ @safe var safeCount: Int { unsafe unsafeCount }
190
191
192
func testMyArray(ints: MyArray<Int>) {
@@ -194,6 +195,6 @@ func testMyArray(ints: MyArray<Int>) {
194
195
_ = unsafe bufferCopy
196
197
print(buffer.safeCount)
- unsafe print(buffer.baseAddress!)
198
+ unsafe print(buffer.unsafeCount)
199
200
0 commit comments