[Issue 4661] Array Literal Incompatible Type Error Msg Should Include Line Number
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 17 17:39:04 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4661
David Simcha <dsimcha at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|rejects-valid |diagnostic
Summary|Array of lazy sequence |Array Literal Incompatible
| |Type Error Msg Should
| |Include Line Number
--- Comment #3 from David Simcha <dsimcha at yahoo.com> 2010-08-17 17:39:01 PDT ---
Ok, so this is a legit diagnostic bug. I'll grant you that. However, thinking
that Map!("a + 1", Range) and Map!("a + 2", Range) are the same type represents
a serious misunderstanding of template alias parameters. The binding of the
lambda function to the Map instance happens at compile time, not runtime.
Let's try a thought experiment, thinking at the C level. What would happen if
Map!"a + 2" were cast to Map!"a + 1" and front() were called?
Map!"a + 1".front() would be called. Inlined (probably) in Map!"a + 1".front()
is something like return _input.front + 1.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list