Compound extension

I am not sure I understand, why with(a){with(b){}} should match [A, B, A]. If we take ordered strategy, then we should always match the tail of actual context order to function receiver order. In your example the context order is G, A, B but signature is [A, B, A], it should not work. It could work in type-based resolution, but I do not think we should mix them.

After some thinking, I came to conclusion that order-based resolution is not that bad. Maybe it we did everything from scratch, It still would be much better to use type-based resolution, but order-based resolution better matches current design.

1 Like