Mixin declarations not showing up in ModuleInfo

bitwise via Digitalmars-d digitalmars-d at puremagic.com
Sat Nov 29 18:10:12 PST 2014


In the following program, the output does not contain 
"SomeClass". Is this a bug?


module main;
import std.stdio;

mixin template Test()
{
	class SomeClass {
		int n = 123;
	}
}

mixin Test;

void main() {

	auto sc = new SomeClass;
	writeln(sc.n);

	foreach(m; ModuleInfo)
	{
		foreach(c; m.localClasses())
		{
			writeln(c.name);
		}
	}
}


More information about the Digitalmars-d mailing list