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
structS<T> { lett: T }
extensionSwhereT == Int {
funcf() {
lets1 = S(t:1) // OKlets2 = S(t:"X") // error: cannot convert value of type 'String' to expected argument type 'Int'
}
}
Additional Detail from JIRA
md5: 1db7e674f8f1fcaff55a47d1eb4e85a0
Issue Description:
For some reason when calling initializer in extension, compiler tries to match unrelated generics.
Example with Array:
✔ Works in function:
❌ Does not work in extension
Error on line
💡 The only workaround is to manually specify generics:
The text was updated successfully, but these errors were encountered: