Bug 19529 – An example from Wikipedia does not compile
Status
RESOLVED
Resolution
WONTFIX
Severity
major
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2018-12-31T04:18:15Z
Last change time
2018-12-31T14:31:45Z
Assigned to
No Owner
Creator
Victor Porton
Comments
Comment #0 by porton — 2018-12-31T04:18:15Z
---
template t(T){
T get(){
return mValue;
}
}
class C{
private int mValue;
mixin t(int);
}
---
$ dmd test.d
test.d(9): Error: ; expected after mixin
test.d(9): Error: no identifier for declarator int
test.d(9): Error: declaration expected, not )
The code above is from https://en.wikibooks.org/wiki/D_Programming/Mixins
Comment #1 by porton — 2018-12-31T04:19:17Z
Sorry, WikiBooks not Wikipedia.
Comment #2 by porton — 2018-12-31T04:20:34Z
$ dmd --version
DMD64 D Compiler v2.080.1
Comment #3 by porton — 2018-12-31T04:35:51Z
It doesn't work with DMD64 D Compiler v2.083.1, too.
Comment #4 by alphaglosined — 2018-12-31T04:52:34Z