Commit 58bc12d
committed
binding resolution fixes
The first bullet says for value types with no arguments, the result is *"the default value for `T`"*. When a struct has an explicit parameterless constructor, `new S()` invokes that constructor and the result may differ from the zeroed default value.
Changes: Qualify the first bullet: when `T` is a *struct_type* with an explicitly declared parameterless constructor, the expression invokes that constructor (falling through to overload resolution in the third bullet), rather than unconditionally returning the default value.1 parent 008dcb6 commit 58bc12d
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2635 | 2635 | | |
2636 | 2636 | | |
2637 | 2637 | | |
2638 | | - | |
| 2638 | + | |
| 2639 | + | |
2639 | 2640 | | |
2640 | 2641 | | |
2641 | 2642 | | |
| |||
0 commit comments