Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tuples type inferrence #14

Open
jcavar opened this issue Apr 2, 2015 · 0 comments
Open

Tuples type inferrence #14

jcavar opened this issue Apr 2, 2015 · 0 comments

Comments

@jcavar
Copy link

jcavar commented Apr 2, 2015

Hi,
In tuples example there is this example:

// We can also specify the type in order to avoid inferrence
let someOtherTuple = (Double(100), Bool(false))

I think comment for example is not true because type of someOtherTuple is still inferred from content. Right example for this comment would be:

let someOtherTuple: (Double, Bool) = (100, false)

In this way we are avoiding inferrence and we will get error if we specify content with wrong type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant