[Issue 22769] `fun()` where fun is a property which returns an object with opCall should call opCall
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 13 19:24:28 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22769
Basile-z <b2.temp at gmx.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |b2.temp at gmx.com
--- Comment #1 from Basile-z <b2.temp at gmx.com> ---
what is the background idea ?
Is this proposal a way to have opCall called without explicit CallExp ?
---
struct S
{
void opCall() @property
{
}
}
S s;
@property S fun()
{
return s;
}
void main()
{
s(); // ok
s; // using @property of opCall, that cannot work
fun; // works using semantics proposed in bugzilla 22769
}
---
--
More information about the Digitalmars-d-bugs
mailing list