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 f4fc002 commit 1c592a7Copy full SHA for 1c592a7
test/Constraints/diagnostics.swift
@@ -641,5 +641,11 @@ func segfault23433271(a : UnsafeMutablePointer<Void>) {
641
f23433271(a[0]) // expected-error {{cannot subscript a value of type 'UnsafeMutablePointer<Void>' (aka 'UnsafeMutablePointer<()>')}}
642
}
643
644
-
+// <rdar://problem/22058555> crash in cs diags in withCString
645
+func r22058555() {
646
+ var firstChar: UInt8 = 0
647
+ "abc".withCString { chars in
648
+ firstChar = chars[0] // expected-error {{cannot subscript a value of type 'UnsafePointer<Int8>'}}
649
+ }
650
+}
651
0 commit comments