April 18, 2008 [Issue 2007] New: Appending one element array doesn't compile | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=2007 Summary: Appending one element array doesn't compile Product: D Version: 2.012 Platform: PC OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: bartosz@relisoft.com I'm working with arrays of arrays of strings, result and ys. I want to append/prepend a one-element array of strings, [y], to ys. Neither compiles. string y = "a"; string [][] ys = []; string [][] result = []; result = ys ~ [y]; result = [y] ~ ys; test.d(30): Error: incompatible types for ((ys) ~ ([y])): 'invariant(char)[][][] ' and 'invariant(char)[][1u]' test.d(31): Error: incompatible types for (([y]) ~ (ys)): 'invariant(char)[][1u] ' and 'invariant(char)[][][]' test.d(31): Error: cannot implicitly convert expression ([y] ~ ys) of type invar iant(char)[][] to invariant(char)[][][] -- |
June 10, 2011 [Issue 2007] Appending one element array doesn't compile | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=2007 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies@gmail.com Version|2.012 |D1 --- Comment #1 from yebblies <yebblies@gmail.com> 2011-06-10 05:37:58 PDT --- This now works in D2, but still fails in D1 (1.068) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation