FS0267 trying to concatenate string in an attribute value with --checked+
Open
Area-Compiler-Options
Bug
Impact-Low
- Dominant language
- F#
- Stars
- 4.3k
- Forks
- 876
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 131
Description
**Repro steps**
Try to compile the following program. Project file:
```
Exe
net5.0
--checked+
```
Program.fs:
```
open System.ComponentModel
[]
[]
let main argv =
0
```
**Expected behavior**
It compiles successfully, just as it does without `--checked+`
**Actual behavior**
Compiler error on the `[]` line:
> Program.fs(4,16): error FS0267: This is not a valid constant expression or custom attribute value
**Known workarounds**
None, other than not enabling overflow checking.
**Related information**
F# Compiler version 11.0.0.0 for F# 5.0
* Operating system: Windows 7 x64
* .NET Runtime kind: .NET 5.0.4
* Editing Tools: VS 2019, Rider
Contributor guide
Assessment
This issue has not been assessed yet.