Mixin a constructor ?
Ellery Newcomer
ellery-newcomer at utulsa.edu
Sun Sep 20 05:38:51 PDT 2009
language_fan wrote:
> Since the constructor has no meaning outside classes, should it be
> interpreted as a free function if mixed in a non-class context? I really
> wonder how this could be valid code. Does the grammar even support the
> 3rd line?
Checking whether a constructor is inside a class happens during one of
the semantic passes. The parser makes no distinction between
class/interface/template/struct/union bodies.
More information about the Digitalmars-d
mailing list