November 21, 2008 [Issue 2465] New: Wrong .stringof value for parameter type of a templated function | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=2465 Summary: Wrong .stringof value for parameter type of a templated function Product: D Version: 2.020 Platform: PC OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: samukha@voliacable.com void foo(T)(T v) { pragma(msg, typeof(v).stringof); pragma(msg, T.stringof); static assert(is(typeof(v) == T)); //ok static assert(typeof(v).stringof == T.stringof); // fails for foo(1) } void main() { foo('a'); foo(1); } ---- The second foo instantiation fails because typeof(v).stringof evaluates to "char" instead of expected "int" -- |
April 20, 2009 [Issue 2465] Wrong .stringof value for parameter type of a templated function | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2465 clugdbug@yahoo.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #1 from clugdbug@yahoo.com.au 2009-04-20 04:46 ------- Working in DMD 2.028 and 1.042. Probably fixed when 2527 was fixed? -- |
Copyright © 1999-2021 by the D Language Foundation