Skip to content

Typing for second variable in for #87

Description

@schungx
for (n, i) in 0..10 {
    ...
}

In a for loop, the second variable (if provided), in this case i, is always int at the beginning of each iteration, so this can probably be hard-coded in.

Technically speaking we can infer the type of n from the range operator as well, but that is not 100% fool-proof.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions