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
According to SE-0039 the #fileLiteral and #imageLiteral were supposed to have been limited to string literals known at compile-time. Instead, they are not limited in this way, allowing regular strings as well as interpolated strings. This should be fixed to emit a compile error.
Likewise, the exposed init on URL from the protocol _ExpressibleByFileReferenceLiteral URL.init(fileReferenceLiteralResourceName name: String) should be typed to take in only a StaticString and Image.init(imageLiteralResourceName name: String) should do the same.
The text was updated successfully, but these errors were encountered:
As mentioned in the PR, the core team decided not to proceed with such a change and will amend the proposal instead to allow variables in object literals.
Additional Detail from JIRA
md5: 5652fb313e901e0b4b5f7dfc56c19bdf
Issue Description:
According to SE-0039 the #fileLiteral and #imageLiteral were supposed to have been limited to string literals known at compile-time. Instead, they are not limited in this way, allowing regular strings as well as interpolated strings. This should be fixed to emit a compile error.
Likewise, the exposed init on URL from the protocol _ExpressibleByFileReferenceLiteral URL.init(fileReferenceLiteralResourceName name: String) should be typed to take in only a StaticString and Image.init(imageLiteralResourceName name: String) should do the same.
The text was updated successfully, but these errors were encountered: