SemanticAnalysis.hpp: Re-add checking for redefinitions of constants
Signed-off-by: Username404-59 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
af9f76ee72
commit
2758a2e95a
|
@ -46,6 +46,11 @@ private:
|
||||||
),
|
),
|
||||||
share_task(Function, Class),
|
share_task(Function, Class),
|
||||||
share_task(Function, Define<true>),
|
share_task(Function, Define<true>),
|
||||||
|
make_nonlocal_task(Define<false>,
|
||||||
|
if (parsedTree.findReferenceByName<Define<true>>(parseComponent.name).has_value()) {
|
||||||
|
error(parseComponent.name + string(" cannot be redefined as it is final"), parseComponent.line);
|
||||||
|
}
|
||||||
|
)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue