@trusted attribute should be replaced with @trusted blocks

Ogi ogion.art at gmail.com
Thu Jan 16 08:45:00 UTC 2020


On Thursday, 16 January 2020 at 01:32:23 UTC, H. S. Teoh wrote:
> Hogwash. Did you even test this before making statements like 
> that?
>
> 	void fun(void function() @safe dg) { }
>
> 	void trustme() @trusted { }
>
> 	void main() {
> 		fun(&trustme);
> 	}
>
> Compiles fine.

You’re right. I feel like a moron now.

If I am not mistaken, this is the only example of covariant 
function attributes.


More information about the Digitalmars-d mailing list