August 02, 2010 [Issue 4570] New: ElementType!(void[]) shows error message. | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=4570 Summary: ElementType!(void[]) shows error message. Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody@puremagic.com ReportedBy: zan77137@nifty.com --- Comment #0 from SHOO <zan77137@nifty.com> 2010-08-02 03:00:40 PDT --- This code displays an error: -------------- main.d ---------------------- import std.range; pragma(msg, ElementType!(void[])); ------------------------------------ dmd -c main void std\array.d(357): Error: [i] has no effect in expression (a[0u]) I think that this error message should be removed. If there is not an objection, I rewrite ElementType template as this: ------------------------------------ template ElementType(R) { static if (is(typeof({return R.init.front();}()) T)) alias T ElementType; else alias void ElementType; } ------------------------------------ -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
August 05, 2010 [Issue 4570] ElementType!(void[]) shows error message. | ||||
---|---|---|---|---|
| ||||
Posted in reply to SHOO | http://d.puremagic.com/issues/show_bug.cgi?id=4570 SHOO <zan77137@nifty.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from SHOO <zan77137@nifty.com> 2010-08-05 07:19:06 PDT --- Fixed. See also: http://www.dsource.org/projects/phobos/changeset/1809 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation