Compiler bug? Functions as Array Properties doesn't work with nested functions

simendsjo simen.endsjo at pandavre.com
Sun Aug 15 09:55:16 PDT 2010


The spec doesn't mention anything about nested functions here.

This works

void foo(int[] a, int x) { };

void main()
{
	int[] array;
	foo(array, 3);
	array.foo(3);
}


But this gives "undefined identifier module t.foo"

void main()
{
	void foo(int[] a, int x) { };
	int[] array;
	foo(array, 3);
	array.foo(3);
}


More information about the Digitalmars-d-learn mailing list