Closed
Description
User-defined template classes should accept void
as type arguments, while at least some built-tin classes (e.g. Array.<T>
and Map.<T>
should not).
The code snippet below fails to compile with the error message: 'void' cannot be used here
.
class Foo.<T> {
static function callIt(f : () -> T) : void {
f();
}
}
class _Main {
static function main(args : string[]) : void {
Foo.<void>.callIt(function () {});
}
}
Metadata
Metadata
Assignees
Labels
No labels