Skip to content

#line in the IDE - #nowarn, FindAllReferences and other things don't work #9795

@abelbraaksma

Description

@abelbraaksma

#line causes many problems in the IDE

#nowarn doesn't work in the presence of #line

#nowarn "25"
#line 1 "foo.fs"
let f 1 = 2

Expect: no warning

Actual:

foo.fs(1,7): warning FS0025: Incomplete pattern matches on this expression. For example, the value '0' may indicate a case not covered by the pattern(s).

FindAllReferences doesn't work

Take this code (presumably generated):

module File1

#nowarn "25"
#line 1 "foo.fs"
let Thing 1 = 2 

FindAllReferences on "Thing"

Expected: one usage at the correct location in the given generated file (this is what C# does)

Actual: one usage on line 1 of File1.fs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Diagnosticsmistakes and possible improvements to diagnosticsBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions