Commit 2c9749a
Fix #12796: handle arrays of user-defined types in custom attributes
Empty arrays of non-encodable types (classes, records, structs) in custom
attributes now compile successfully by encoding them as System.Object[] per
ECMA-335. Non-empty arrays of such types produce FS3885 instead of the
internal error FS0192.
Changes:
- IlxGen.fs: detect unencodable element types in array attribute args
- il.fs: add 0x51 (SERIALIZATION_TYPE_TAGGED_OBJECT) decoder
- FSComp.txt: new diagnostic FS3885
- Tests: 7 new AttributeCheckingTests (compile + ILVerify + run)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent c3c01c9 commit 2c9749a
18 files changed
Lines changed: 337 additions & 28 deletions
File tree
- docs/release-notes/.FSharp.Compiler.Service
- src/Compiler
- AbstractIL
- CodeGen
- xlf
- tests/FSharp.Compiler.ComponentTests/Language
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4978 | 4978 | | |
4979 | 4979 | | |
4980 | 4980 | | |
| 4981 | + | |
4981 | 4982 | | |
4982 | 4983 | | |
4983 | 4984 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10294 | 10294 | | |
10295 | 10295 | | |
10296 | 10296 | | |
10297 | | - | |
| 10297 | + | |
10298 | 10298 | | |
10299 | 10299 | | |
10300 | 10300 | | |
| |||
10334 | 10334 | | |
10335 | 10335 | | |
10336 | 10336 | | |
10337 | | - | |
| 10337 | + | |
| 10338 | + | |
| 10339 | + | |
| 10340 | + | |
| 10341 | + | |
| 10342 | + | |
| 10343 | + | |
| 10344 | + | |
| 10345 | + | |
| 10346 | + | |
| 10347 | + | |
| 10348 | + | |
| 10349 | + | |
| 10350 | + | |
| 10351 | + | |
| 10352 | + | |
| 10353 | + | |
| 10354 | + | |
| 10355 | + | |
| 10356 | + | |
| 10357 | + | |
| 10358 | + | |
| 10359 | + | |
| 10360 | + | |
| 10361 | + | |
| 10362 | + | |
| 10363 | + | |
| 10364 | + | |
| 10365 | + | |
| 10366 | + | |
| 10367 | + | |
| 10368 | + | |
| 10369 | + | |
| 10370 | + | |
10338 | 10371 | | |
10339 | 10372 | | |
10340 | 10373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1814 | 1814 | | |
1815 | 1815 | | |
1816 | 1816 | | |
| 1817 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments