D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4395 - Nested map fails
Summary: Nested map fails
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: phobos (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-27 05:09 UTC by Simen Kjaeraas
Modified: 2010-08-14 18:52 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Simen Kjaeraas 2010-06-27 05:09:13 UTC
auto fn1 = ( string s ) {
		return s;
	};
auto fn2 = ( string s ) {
		return map!fn1( [""] );
	};
auto idirs = map!fn2( [""] );

The above code fails with the following error message:

foo.d(114): Error: struct foo.main.Map!(fn2,string[]).Map inner struct Map cannot be a field
foo.d(114): Error: struct foo.main.Map!(fn2,string[]).Map inner struct Map cannot be a field
Comment 1 David Simcha 2010-08-14 18:52:30 UTC
This appears to have been fixed, possibly due to fixes for several inner struct and forward reference bugs in the last release.