Skip to content

Query expressions and --warnon:1182 #422

Description

@Tarmil

In query expressions, variables bound using for are not recognized as used if they are not selected, even if they are otherwise used for example in a where or a let.

Example:

// Expected: no warning// Actual: warning FS1182: The value 'x' is unused
query {for x in[1;2;3]do
where (x >2)
select 1}// Expected: no warning// Actual: warning FS1182: The value 'x' is unused
query {for x in[1;2;3]dolety= x
select y }// Expected: no warning// Actual: no warning
query {for x in[1;2;3]do
where (x >2)
select x }

Tested on F# 3.1.2 and 4.0-RC.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-QueriesQuery expressions and library implementationBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

    Type

    Projects

    Status
    In Progress

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions