← Back to index
|
Original Bugzilla link
Bug 10406 – std.conv.to of string array to fixed sized array
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2013-06-18T10:46:33Z
Last change time
2020-03-21T03:56:32Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
bearophile_hugs
Comments
Comment #0
by bearophile_hugs — 2013-06-18T10:46:33Z
import std.conv: to; void main() { auto xy = ["1", "2"].to!(int[2]); } DMD 2.063.2 gives: ...\dmd2\src\phobos\std\conv.d(1325): Error: cannot implicitly convert expression (result) of type int[] to int[2u] ...\dmd2\src\phobos\std\conv.d(276): Error: template instance std.conv.toImpl!(int[2u], string[]) error instantiating temp.d(3): instantiated from here: to!(string[]) temp.d(3): Error: template instance std.conv.to!(int[2u]).to!(string[]) error instantiating