|
Hi,
I tried to make a Rep field Additive to use it in one of the invariants of an inherited class, but the compiler didn't not allow it. Then I tried to do it by get property, compiler complains that this is not a Rep field. Actually I have two synonym invariants,
I tried them both and following are the invariants and their corresponding error messages.
invariant exists {int i in (0: numRunways); Runways[i].IntRunway};
Error 20 Expression is not admissible: it is not visibility-based, and first access 'get_Runways' is non-rep thus further field access is not admitted.
C:\Users\Adnan\documents\visual studio 2010\Projects\SpecSharp2010\SpecSharp2010\Airports\InternationalAirport.ssc
11 47 SpecSharp2010
invariant exists {Runway! r in Runways; r.IntRunway};
Error 20 Expression is not admissible: first access on array or binding member must be rep.
C:\Users\Adnan\documents\visual studio 2010\Projects\SpecSharp2010\SpecSharp2010\Airports\InternationalAirport.ssc
12 34 SpecSharp2010
Is there a way to use a Rep field of a base class in the invariants of an inherited class.
Thanks,
Adnan
|