Thread overview | |||||
---|---|---|---|---|---|
|
October 28, 2006 [Issue 468] New: argument wrongfully identified as type in template instantiation | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=468 Summary: argument wrongfully identified as type in template instantiation Product: D Version: 0.172 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: roel.mathys@gmail.com compile this: template check( char ch1 , char ch2) { const bool check = ch1 == ch2; } import std.stdio; void main() { const char[] s = "123+456" ; writefln( check!( '+', s[3] )); } adding parentheses around s, e.g. (s)[3] let's the thing compile. -- |
November 23, 2006 Re: [Issue 468] New: argument wrongfully identified as type in template instantiation | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail Attachments: | d-bugmail@puremagic.com schrieb am 2006-10-28: > http://d.puremagic.com/issues/show_bug.cgi?id=468 > compile this: > > template check( char ch1 > , char ch2) > { > const bool check = ch1 == ch2; > } > > import std.stdio; > void main() > { > const char[] s = "123+456" ; > writefln( check!( '+', s[3] )); > } > > adding parentheses around s, e.g. (s)[3] let's the thing compile. test cases: http://dstress.kuehne.cn/run/t/template_23_A.d http://dstress.kuehne.cn/run/t/template_23_B.d Thomas |
November 25, 2006 [Issue 468] argument wrongfully identified as type in template instantiation | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=468 bugzilla@digitalmars.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #2 from bugzilla@digitalmars.com 2006-11-25 03:56 ------- Fixed DMD 0.175 -- |
Copyright © 1999-2021 by the D Language Foundation