Zcoin implementation bug enabled attacker to create 548, 000 Zcoins

Jack Stouffer via Digitalmars-d digitalmars-d at puremagic.com
Tue Mar 7 07:11:42 PST 2017


On Tuesday, 7 March 2017 at 15:05:45 UTC, ketmar wrote:
> only for primitive types, sadly.
>
>  void main () {
>    Object a, b;
>    a == b;
>  }
>
> oops. no more error messages. yes, i know that this invokes 
> `opEquals()`, and `opEquals()` can have side-effects. but what 
> are the chances of writing such code *intentionally*?

Hmm, I guess the compiler can (and should) output an error 
message if it knows that opEquals is `pure`.

https://issues.dlang.org/show_bug.cgi?id=17245


More information about the Digitalmars-d mailing list