[Issue 2210] Error: void initializer has no value
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jul 9 09:10:43 PDT 2008
http://d.puremagic.com/issues/show_bug.cgi?id=2210
------- Comment #1 from 2korden at gmail.com 2008-07-09 11:10 -------
Please, do not hurry in posting your bug report!
The piece of code itself doesn't have any issues.
I think the issue you are talking about is this:
template instance(T) {
const T instance = void;
}
void main() {
int i = instance!(char[]).length; // works at runtime
const int i = instance!(char[]).length; // doesn't work at compile time
}
I can not judge whether it is a correct behavior or not. It just worked before
but doesn't anymore.
--
More information about the Digitalmars-d-bugs
mailing list