[nem-en] closure in ctor, this in ctor

Dmitry Ivankov divanorama at gmail.com
Sun Apr 1 15:48:21 CEST 2007


One more question:
this (){
 mutable x = 0;
 while (x < 2) { ++x; when (x == 1) base (); }
}
Does it make any sense to allow ctor calls inside local funs?
In this example local fun is inlined and everything compiles, and base
refers to our class base.
If we use base/this call in first-class fun we'll get ICE in [almost] all
cases.

Currently i do base call check between T2 and T3, and local funs are inlined
only in T3.
If we allow local funs to call base (if they are inlined) then checks should
be moved one step closer to IL generation :(
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /mailman/pipermail/devel-en/attachments/20070401/9bdbdd55/attachment.html


More information about the devel-en mailing list