Yes, I have, all the time, allow inter-model references switched on.
This is what you wanted, or better what you can get, the name of the
EClass.
And >it is what instance.type.name should return.
This would be your discriminator, the name of the EClass in
instance.type Generalization/Class .... what ever name the EClass has.
As you say, what I want is to discriminate instance.type but the problem
is that
instance.type returns IN!<notnamedyet> and
instance.type.name returns OclUndefined and not Generalization/Class.
I don't understand why.