void f(wchar[] s) { s[]="a"; } Error: cannot implicitly convert expression ("a") of type string to wchar[]
The 'regression' severity level indicates that the code works with a previous version of dmd. What version does it work with?
void f(wchar[] s) { s[]="a"w; } works. Obviously in the original example it fails because of the encoding of the literal and the one of the target variable is not the same. Did it use to work ? (even with IDEone, dmd 2.067, it fails).
Introduced in 2.064.
https://github.com/D-Programming-Language/dmd/pull/5511
Commits pushed to stable at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f3849978badaf2e07966c2f6c5c8af50486a1b0a fix Issue 15778 - polysemous string type doesn't work in array operation https://github.com/D-Programming-Language/dmd/commit/f1ee0d010a0cdcb7af096f157a18228a9eca0e2f Merge pull request #5511 from 9rnsr/fix15778 [REG2.064] Issue 15778 - polysemous string type doesn't work in array operation
I'm sorry bugzilla redirects in a strange way Restored status to regression
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/f3849978badaf2e07966c2f6c5c8af50486a1b0a fix Issue 15778 - polysemous string type doesn't work in array operation https://github.com/D-Programming-Language/dmd/commit/f1ee0d010a0cdcb7af096f157a18228a9eca0e2f Merge pull request #5511 from 9rnsr/fix15778
(In reply to ag0aep6g from comment #1) > The 'regression' severity level indicates that the code works with a > previous version of dmd. What version does it work with? I upgraded from 2.063 :3