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
All swift routines that returned optionals used to be able to return(nil).
This is a now a compiler error : 'nil' requires a contextual type
This requires that all code has to be modified to remote parentheses around 'nil'.
I am presuming this is a bug.
func TEST1() -> Int?
{
return( nil ) // Fails to compile with : 'nil' requires a contextual type
}
Hi! This bug report isn't Swift for Tensorflow specific, so it would be more appropriate to file it under "Swift" and not "Swift for Tensorflow". That said, this seems to be fixed on the main branch; you can double-check this by downloading a recent toolchain snapshot from https://swift.org/download/#snapshots .
This was resolved by #34046
antony.newman (JIRA User) can you please verify it and close? Since it made it to 5.3 I think this could be on the lastest Xcode release =]
Environment
Mac Pro
Xcode 12.0
MacOs 10.15.7
Swift : All Versions
Additional Detail from JIRA
md5: 81ae772acc3ce5634cf3e42c95da0da7
Issue Description:
All swift routines that returned optionals used to be able to return(nil).
This is a now a compiler error : 'nil' requires a contextual type
This requires that all code has to be modified to remote parentheses around 'nil'.
I am presuming this is a bug.
func TEST1() -> Int?
{
return( nil ) // Fails to compile with : 'nil' requires a contextual type
}
func TEST2() -> Int?
{
return nil // Will Compile
}
The text was updated successfully, but these errors were encountered: