| changeset 237 | c77540a61905 |
| parent 236 | 072f1114ea5d |
| child 238 | e9bec7549c28 |
1.1 --- a/src/compiler/SemanticAnalysis.cpp Mon Dec 24 16:09:13 2012 -0800 1.2 +++ b/src/compiler/SemanticAnalysis.cpp Mon Dec 24 16:43:22 2012 -0800 1.3 @@ -431,6 +431,11 @@ 1.4 1.5 Local<Type> type(zone_, node->sym()->type()); 1.6 1.7 + if (node->sym()->type()->isVoid()) { 1.8 + cc_.reportError(node->type()->pos(), Message_CannotDeclareVoid); 1.9 + return; 1.10 + } 1.11 + 1.12 if (node->initialization()) { 1.13 HIR *hir = NULL; 1.14