[Issue 12013] static array of chars implicitly converts to string
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jan 27 13:14:30 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12013
bearophile_hugs at eml.cc changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |bearophile_hugs at eml.cc
--- Comment #2 from bearophile_hugs at eml.cc 2014-01-27 13:14:26 PST ---
It's not just a problem with char[]/string, it's a more general problem (Rust
language has a type system designed to prevent such bugs statically):
int[6] foo() {
return [10, 20, 30, 40, 50, 60];
}
int[] bar() {
return foo;
}
void main() {
import std.stdio;
bar.writeln;
}
One output:
[4202649, 10, 6, 1244636, 1244668, 4202623]
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list