pstlab / oRatio

oRatio is an Integrated Logic and Constraint based solver
Apache License 2.0
6 stars 1 forks source link

Addressing fields of enum variables #22

Closed riccardodebenedictis closed 3 years ago

riccardodebenedictis commented 3 years ago

Addressing fields of enum variables fails when different fields refer to the same object.

class City {}

class Location {

    City city;

    Location(City city) : city(city) {}
}

City city0 = new City();
Location l0 = new Location(city0);
Location l1 = new Location(city0);

City city1 = new City();
Location l2 = new Location(city1);
Location l3 = new Location(city1);

Location l;
l.city == city0;

In the above case, the l variable should have l0 and l1 in its domain.