Dmitry Ivankov
2007-06-15 22:35:25 UTC
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.
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.