Skip to content

Inconsistent handling of arguments for disposable types #15622

Closed
@psfinaki

Description

@psfinaki

This code produces an error only in the second case:

open System.IO

let stream1 = new MemoryStream 42

let capacity = 42
let stream2 = new MemoryStream capacity

image

Note there is no error if new is unused (there are legitimate warnings though):

image

We need to decide what to do about that before addressing this ticket - basically either fix the parser or the code fix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Compiler-Syntaxlexfilter, indentation and parsingBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions