Thread overview | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
May 17, 2014 [Issue 12757] Refused fixed size array literal function argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12757 yebblies <yebblies@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yebblies@gmail.com --- Comment #1 from yebblies <yebblies@gmail.com> --- That's not an array literal, that's either an array initializer or an associative array literal, depending on context. You can't use an array initializer except when initializing a variable. -- |
May 17, 2014 [Issue 12757] Refused fixed size array literal function argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12757 --- Comment #2 from bearophile_hugs@eml.cc --- (In reply to yebblies from comment #1) > That's not an array literal, that's either an array initializer or an associative array literal, depending on context. You can't use an array initializer except when initializing a variable. I see. So is this request INVALID and to be closed? -- |
May 17, 2014 [Issue 12757] Refused fixed size array literal function argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12757 --- Comment #3 from yebblies <yebblies@gmail.com> --- (In reply to bearophile_hugs from comment #2) > (In reply to yebblies from comment #1) > > That's not an array literal, that's either an array initializer or an associative array literal, depending on context. You can't use an array initializer except when initializing a variable. > > I see. So is this request INVALID and to be closed? Either that or turn it into an enhancement to allow array initializers to be used in any array-accepting context instead of just assignment. -- |
May 17, 2014 [Issue 12757] Refused fixed size array literal function argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12757 --- Comment #4 from yebblies <yebblies@gmail.com> --- If this was implemented, this call would become ambiguous. void foo(int[1]) {} void foo(int[int]) {} void main() { foo([0 : 1]); } -- |
May 18, 2014 [Issue 12757] Refused fixed size array literal function argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12757 bearophile_hugs@eml.cc changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |4703 Severity|normal |enhancement --- Comment #5 from bearophile_hugs@eml.cc --- (In reply to yebblies from comment #4) > If this was implemented, this call would become ambiguous. > > void foo(int[1]) {} > void foo(int[int]) {} > > void main() > { > foo([0 : 1]); > } Right. And adding more ambiguous code to D is not a good idea. Walter doesn't seem in a rush to find a fix for my Issue 4703 that is almost four years old. If some kind of fix for issue 4703 is ever found and accepted, then this enhancement request becomes acceptable. So I tag this as enhancement request that depends on Issue 4703 . -- |
June 30, 2014 [Issue 12757] Refused fixed size array literal function argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12757 hsteoh@quickfur.ath.cx changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hsteoh@quickfur.ath.cx -- |
March 20, 2019 [Issue 12757] Refused fixed size array literal function argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12757 Basile-z <b2.temp@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rejects-valid | CC| |b2.temp@gmx.com Hardware|x86 |All OS|Windows |All -- |
March 21, 2020 [Issue 12757] Refused fixed size array literal function argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12757 Basile-z <b2.temp@gmx.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|b2.temp@gmx.com | -- |
December 17, 2022 [Issue 12757] Refused fixed size array literal function argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12757 Iain Buclaw <ibuclaw@gdcproject.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P1 |P4 -- |
December 13 [Issue 12757] Refused fixed size array literal function argument | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=12757 --- Comment #6 from dlangBugzillaToGithub <robert.schadek@posteo.de> --- THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18829 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB -- |
Copyright © 1999-2021 by the D Language Foundation