2.067 Beta: Behavior of enum and ref changed
Andre via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Mar 10 00:04:47 PDT 2015
Hi,
following coding raises a compiler error with the beta of 2.067.
Is this error intended or not?
It is working if I change first line of main to: ulong bits;
enum Bits: ulong
{
none = 0
}
bool hasBit(ref ulong rBits, ulong rBit)
{
return cast(bool)(rBits & rBit);
}
void main()
{
Bits bits;
hasBit(bits, Bits.none);
}
function app.hasBit (ref ulong rBits, ulong rBit) is not callable
using argument types (Bits, Bits)
Kind regards
André
More information about the Digitalmars-d-learn
mailing list