[nem-en] Field initializers specification
Kamil Skalski
kamil.skalski at gmail.com
Sun Mar 18 16:56:43 CET 2007
I think we need to add the additional state to handle this anyway. But
you are right, by putting it in Typer2 we could avoid the state to be
modified as side-effect of typing somethin g in macro.
2007/3/18, Dmitry Ivankov <divanorama at gmail.com>:
> On 3/18/07, Kamil Skalski <kamil.skalski at gmail.com> wrote:
> > You are right - MaybeAddBaseCall is currently executed before typing
> > method, so it will ignore that 'base' calls generated by macros. So I
> > think it would be best to replace it with the approach I mentioned
> > before - have a flag in Typer, which would detect the presence of
> > base() anywhere in the method. So after typing of constructor's body
> > it would be known for sure if base call occured or if we should insert
> > the default 'base()'
> >
> It's relatively quick to write, but it'll make typer have unnecessary state.
> And if we just tweak DoType to set this flag when it sees base call then
> we'll need to tweak some more things (for example if macro gets typer, calls
> TypeExpr("base(); ..."), and not inserts that code to body we'll still have
> flag set, which is wrong).
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>
>
--
Kamil Skalski
http://nazgul.omega.pl
More information about the devel-en
mailing list