mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 05:00:16 +03:00
16 lines
360 B
Text
16 lines
360 B
Text
Initializing a field with itself has been deprecated
|
|
|
|
This is to prevent a common mistake when a field and a parameter ought to have the same name,
|
|
but one is misspelled where it's declared:
|
|
|
|
---
|
|
struct S
|
|
{
|
|
int field;
|
|
|
|
this(int feild) // supposed to be: this(int field)
|
|
{
|
|
this.field = field; // equal to this.field = this.field
|
|
}
|
|
}
|
|
---
|