mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
15 lines
296 B
Text
15 lines
296 B
Text
Initializing a field with itself has been deprecated
|
|
|
|
This is to prevent a common mistake when typing a simple constructor, where a parameter name is misspelled:
|
|
|
|
---
|
|
struct S
|
|
{
|
|
int field;
|
|
|
|
this(int feild)
|
|
{
|
|
this.field = field; // equal to this.field = this.field
|
|
}
|
|
}
|
|
---
|