https://issues.dlang.org/show_bug.cgi?id=21107
Issue ID: 21107
Summary: Cannot define an r/w property inside a function
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
It wonders me that the following program does not compile:
void main() {
@property int x() { return 0; }
@property void x(int) { }
}
x.d(3): Error: declaration x is already defined
Is it a DMD v2.090.1 bug?
If it should not be compilable indeed, it is nevertheless a bug: The error
message should be more clear.
--