|
@@ -79,9 +79,12 @@ Class VarValue Extends Value
|
|
|
If vdecl.type
|
|
|
type=vdecl.type.Semant( scope )
|
|
|
If vdecl.init init=vdecl.init.SemantRValue( scope,type )
|
|
|
- Else
|
|
|
+ Else If vdecl.init
|
|
|
init=vdecl.init.SemantRValue( scope )
|
|
|
+ If TCast<VoidType>( init.type ) Throw New SemantEx( "Variables cannot have 'Void' type" )
|
|
|
type=init.type
|
|
|
+ Else
|
|
|
+ SemantError( "VarValue.OnSemant()" )
|
|
|
Endif
|
|
|
|
|
|
If Not type.IsGeneric And Not vdecl.IsExtern And Not Cast<Block>( scope )
|