Error: type XXX is not an expression
Era Scarecrow
rtcvb32 at yahoo.com
Sun Sep 1 21:09:47 PDT 2013
I feel like i need to fully re-learn and familiarize myself with
D now.
This is an interesting error I'm coming across, it's not
pointing to anything in particular. I've used the -v verbose flag
and it seems to appear each time after a struct declaration.
code subrecord
function smartmerged.subrecord.Changes.__xopEquals
Error: type FlagStates is not an expression
Error: type FlagStates is not an expression
The struct is as follows:
struct Changes {
string fileFrom; ///
Flags state; ///previous state, be it master/plugin, or
whatever
ROMBuffer oldData;///the data in question
}
aliases referenced from Changes:
alias immutable(ubyte)[] ROMBuffer;
alias HandleFlags!(FlagStates, int) Flags;
enum FlagStates {
def = 0x0,
changed = 1,
readOnly = 1 << 1,
isOriginal= 1 << 2,
invisible = 1 << 3,
//other states, truncated for example
}
struct HandleFlags(E, I)
if (is(E == enum) && isIntegral!(I) && isFloatingPoint!(I) ==
false) {
// Yeah a lot of stuff in here.. binary flag handling
// in my GitHub somewhere.
}
From what I can see, the default opEquals is breaking as it's
doing something. This used to compile and has needed some tweaks.
I'll see if I can compile enough to duplicate this simply.
More information about the Digitalmars-d-learn
mailing list