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/Sema/object_literals_osx.swift
+3Lines changed: 3 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,3 +24,6 @@ let p1: Path = #fileLiteral(resourceName: "what.txt")
24
24
letp2= #fileLiteral(resourceName:"what.txt") // expected-error{{could not infer type of file reference literal}} expected-note{{import Foundation to use 'URL' as the default file reference literal type}}
25
25
26
26
lettext= #fileLiteral(resourceName:"TextFile.txt").relativeString! // expected-error{{type of expression is ambiguous without more context}}
27
+
28
+
// rdar://problem/49861813
29
+
#fileLiteral() // expected-error {{cannot convert value of type '()' to expected argument type '(resourceName: String)'}}
0 commit comments