This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Commit 3a98968
Have Microsoft.CSharp pick correct default for optional MarshalAs(UnmanagedType.IDispatch) (#25508)
* Use null as default for optional parameters that marshal as IDispatch
Fixes #25507
* Don't allocate six arrays for empty parameters in MethodOrPropertySymbol
* More tests for default parameter value handling
* Remove dead path from SetParameterAttributes
Looks for default decimal value, but we've already looked for that via
DecimalConstantAttribute.
* Remove dead branch in handling of assigning Type.Missing
Called if a parameter type which is known to be typeof(object) is
typeof(Missing), which clearly can't happen. (And if it did the result
would be a harmless cast from Missing to Missing anyway).
* More tests for optional arguments
Default enums & structs and optionals without defaults.
* Assert MethodOrPropertySymbol._Params is set only once.1 parent 016659c commit 3a98968
File tree
5 files changed
+533
-26
lines changed- src/Microsoft.CSharp
- src/Microsoft/CSharp/RuntimeBinder
- Semantics
- Symbols
- tests
5 files changed
+533
-26
lines changedLines changed: 1 addition & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
586 | 586 | | |
587 | 587 | | |
588 | 588 | | |
589 | | - | |
590 | | - | |
591 | | - | |
592 | | - | |
593 | | - | |
594 | | - | |
595 | | - | |
596 | | - | |
597 | | - | |
| 589 | + | |
598 | 590 | | |
599 | 591 | | |
600 | 592 | | |
| |||
Lines changed: 23 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | | - | |
| 63 | + | |
63 | 64 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
70 | 82 | | |
71 | | - | |
| 83 | + | |
72 | 84 | | |
73 | 85 | | |
74 | 86 | | |
| |||
157 | 169 | | |
158 | 170 | | |
159 | 171 | | |
160 | | - | |
161 | | - | |
162 | 172 | | |
163 | 173 | | |
164 | | - | |
| 174 | + | |
| 175 | + | |
165 | 176 | | |
166 | 177 | | |
167 | | - | |
| 178 | + | |
168 | 179 | | |
169 | 180 | | |
170 | 181 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1620 | 1620 | | |
1621 | 1621 | | |
1622 | 1622 | | |
| 1623 | + | |
1623 | 1624 | | |
1624 | 1625 | | |
1625 | 1626 | | |
| |||
1653 | 1654 | | |
1654 | 1655 | | |
1655 | 1656 | | |
1656 | | - | |
1657 | | - | |
1658 | | - | |
1659 | | - | |
1660 | | - | |
1661 | 1657 | | |
1662 | 1658 | | |
1663 | 1659 | | |
| |||
0 commit comments