dotnet / dotnet/fsharp

#nowarn to be interpreted consistently in fsi

Open
#10,535 1 comment 0 reactions 0 assignees View on GitHub
Area-Compiler-Syntax Area-FSI Feature Request
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

with nowarn.fsx containing the following:

```fsharp
#nowarn "1104"
let ``@nowarn`` = 1
```

trying to invoke it with

> dotnet fsi nowarn.fsx

getting

> nowarn.fsx(2,5): warning FS1104: Identifiers containing '@' are reserved for use in F# code generation

If I try to do the same by pasting the contents in interactive session, it hides the warning.

The work around is to use `--nowarn` when invoking `fsi`.

Would it make sense to also hide the warnings in the first case?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.