import std.stdio; void main() { double[] foo = [1.0,2,3,4,5].dup; double[] bar = [6.0,7,8,9,10].dup; foo[] += bar; // foo now still == [1.0, 2.0, 3.0, 4.0, 5.0]. writeln(foo); foo[] += bar[]; // Works. writeln(foo); uint[] intFoo = [1u,2,3,4,5].dup; uint[] intBar = [6u,7,8,9,10].dup; intFoo[] += intBar; // intFoo is now [6,7,8,9,10]. writeln(intFoo); intFoo[] += intBar[]; writeln(intFoo); // Works. } The compiler should either reject array ops in the form of foo[] += bar, or it should work. Either way, it should not fail silently with results that are arbitrary and inconsistent among types.
http://www.dsource.org/projects/dmd/changeset/509
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル