Anonymous nogc class

Jiyan via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Sep 7 16:40:11 PDT 2017


Hey,
wanted to know whether it is possible to make anonymous nogc 
classes:

interface I
{
	public void ap();
}
void exec(I i)
{
	i.ap;
}

// now execute, but with something like `scope`
exec( new  class  I
{
	int tr = 43;
	override void ap(){tr.writeln;}
});

Thanks :)


More information about the Digitalmars-d-learn mailing list