You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/Constraints/valid_pointer_conversions.swift
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,13 @@ func givesPtr(_ str: String) {
31
31
takesDoubleOptionalPtr(i) // expected-error {{cannot convert value of type 'Int' to expected argument type 'UnsafeRawPointer??'}}
32
32
takesMutableDoubleOptionalPtr(arr) // expected-error {{cannot convert value of type '[Int]' to expected argument type 'UnsafeMutableRawPointer??'}}
33
33
34
-
// FIXME(SR-12382): Poor diagnostic.
35
-
takesMutableDoubleOptionalTypedPtr(&i)// expected-error {{type of expression is ambiguous without more context}}
34
+
takesMutableDoubleOptionalTypedPtr(&i)// expected-error {{cannot convert value of type 'UnsafeMutablePointer<Int>' to expected argument type 'UnsafeMutablePointer<Double>'}}
35
+
// expected-note@-1 {{arguments to generic parameter 'Pointee' ('Int' and 'Double') are expected to be equal}}
0 commit comments