[nem-en] Type inference in completion
vc
vc at rsdn.ru
Thu May 3 02:00:37 CEST 2007
> The problem is that you jump into typing process too early. The type
> of x is known only after the DelyedTyping is finished, but your
> Complete method is called during the first run of typer. I'm not sure
> how it could be fixed, but I guess there must be a change in the model
> of completion here... you should somehow hook into the delayed typing
> and intercept the moment, when x's type becomes known and compiler is
> trying to re-run typing of Member (obj, HalfId) node. This however
> requires for example proper handling of such nodes in original typer
> methods (like TypeMember).
As I can understand type inference first process lambda body and on it
result make overloads resolution. But in case:
x => x.|
typer can't do assumptions about type of 'x'.
I right?
Maybe in this case try to make overloads resolution only on basis of
arguments count and types of arguments which can be inferred?
And second question...
How I can make hook on some identifier (object or member access) in order to
get result of DelyedTyping?
> Maybe Michal could give you some more hints.
It's will be nice.
Vlad
More information about the devel-en
mailing list