This is not even a hypothetical feature. There is at least one language which used a type information to resolve associativity [1]. I have even used one, it works, but was very hard to get accustomed for me.
[1] https://dl.acm.org/doi/10.1145/1596655.1596667 (especially search for "juxtaposition")