[nem-en] overloads & inference

Dmitry Ivankov divanorama at gmail.com
Sat Jun 16 00:35:25 CEST 2007


Hi.

I've found solution to bug 1026, scenario was + ->
op_Addition as operator -> op_Addition as method (overloaded, only 2
overloads) -> fail
solution is to make + ->
op_Addition as operator -> op_Addition as overloaded operator (only 2
overloads) -> more overloads from better typed args -> ok
So to make it work I add new DelayedTyping.Kind.OverloadedOperator, which do
same things as Kind.Overloaded, but also do LookupOperator (arg.type, name).

And here goes the question: how does typing collect all possible overloads?
Does it fetch new ones when args types become more precise? (maybe extension
methods have
problem like 1026 too)

And one more: should we allow using op_Addition-like names as synonims for
"+" and others?
Currently these names are visible only when "using
class_declaring_op_Addition" and treated as functions only, not as smth like
synonims of operators.
While "+" is also visible when it is declared in one of it's args class.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman/pipermail/devel-en/attachments/20070616/a27af65a/attachment.html


More information about the devel-en mailing list