| 55 | } |
| 56 | |
| 57 | void CoercionArray::setRule(const TypeClause* from, const TypeClause *to) |
| 58 | { |
| 59 | CoercionRule newRule; |
| 60 | newRule.setRule(from, to); |
| 61 | |
| 62 | for (unsigned n = 0; n < getCount(); ++n) |
| 63 | { |
| 64 | if (getElement(n) == newRule) |
| 65 | { |
| 66 | remove(n); |
| 67 | break; |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | add(newRule); |
| 72 | } |
| 73 | |
| 74 | void CoercionRule::raiseError() |
| 75 | { |