Properties

monkyyy crazymonkyyy at gmail.com
Thu Jul 18 23:59:40 UTC 2024


On Thursday, 18 July 2024 at 23:40:39 UTC, monkyyy wrote:
> 
> 

or simplier, @property adds in a unittest `static 
assert(__traits(compiles,foo=foo;))`

```d
@property int foo()=>3;
void foo(int){}//compiles

@property float bar()=>3;
void bar(float){}// fails "property bar can not assign to itself"
```


More information about the dip.ideas mailing list