@property for simple methods?
Vladimirs Nordholm
v at vladde.net
Mon Apr 2 13:57:14 UTC 2018
Heyo.
I have a struct with a couple "property" methods, like:
struct A
{
auto foo(int bar) { /* do something */ }
}
Is there any reason for me to add the @property tags for the
method? The following code compiles just fine with the struct
above
A a = A();
a.foo = 42; // no @property tag for `foo(int bar);` yet works
Best regards,
Vladimirs Nordholm
More information about the Digitalmars-d-learn
mailing list