Commit dcaa43f
Fix empty array handling in custom attributes: use Object element type instead of erroring
Empty arrays of user-defined types in custom attributes (e.g. [<DefaultValue([||] : A[])>])
no longer produce FS3885. Since no elements need encoding, System.Object is used as the
element type. Non-empty arrays of unencodable types still error correctly.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 73cfbce commit dcaa43f
3 files changed
Lines changed: 24 additions & 16 deletions
File tree
- docs/release-notes/.FSharp.Compiler.Service
- src/Compiler/CodeGen
- tests/FSharp.Compiler.ComponentTests/Language
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10224 | 10224 | | |
10225 | 10225 | | |
10226 | 10226 | | |
10227 | | - | |
10228 | | - | |
10229 | | - | |
10230 | | - | |
10231 | | - | |
10232 | | - | |
10233 | | - | |
10234 | | - | |
10235 | | - | |
10236 | | - | |
| 10227 | + | |
| 10228 | + | |
| 10229 | + | |
| 10230 | + | |
| 10231 | + | |
| 10232 | + | |
| 10233 | + | |
| 10234 | + | |
| 10235 | + | |
| 10236 | + | |
| 10237 | + | |
10237 | 10238 | | |
10238 | | - | |
| 10239 | + | |
| 10240 | + | |
| 10241 | + | |
| 10242 | + | |
| 10243 | + | |
| 10244 | + | |
| 10245 | + | |
| 10246 | + | |
10239 | 10247 | | |
10240 | 10248 | | |
10241 | 10249 | | |
| |||
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
83 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
94 | 95 | | |
95 | 96 | | |
96 | 97 | | |
97 | | - | |
98 | | - | |
| 98 | + | |
0 commit comments