mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
Don't allow short constructor with non-void expression except this()
and super()
(#17489)
This commit is contained in:
parent
a13b00fab1
commit
a7f6b04a0c
4 changed files with 38 additions and 2 deletions
|
@ -15,7 +15,7 @@ class A {
|
|||
bool isNull() => this is null;
|
||||
|
||||
this() {}
|
||||
this(int x) => _x = x;
|
||||
this(int x) { _x = x; }
|
||||
this(float y) => this(cast(int) y);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue