April 21, 2004 [BUG] function overloading: char[] vs wchar[] | ||||
---|---|---|---|---|
| ||||
void foo(char[] s) { } void foo(wchar[] s) { } void main() { foo("test"); foo(`test`); } |
April 22, 2004 Re: [BUG] function overloading: char[] vs wchar[] | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrew Edwards | Andrew Edwards wrote: > void foo(char[] s) > { > } > > void foo(wchar[] s) > { > } > > void main() > { > foo("test"); > foo(`test`); > } I think that's the intended behavior. Add a cast(char[]) or cast(wchar[]) to select which overload to use. See also: http://www.digitalmars.com/drn-bin/wwwnews?D/26437 -- Justin http://jcc_7.tripod.com/d/ |
Copyright © 1999-2021 by the D Language Foundation