Make class ref typing stricter (#3671)

Prevents the possibility of assigning an integer to a class reference,
both at the SystemVerilog and the emitted C++ levels.

Signed-off-by: Krzysztof Bieganski <[email protected]>
This commit is contained in:
Krzysztof Bieganski
2022-10-13 14:33:15 +02:00
committed by GitHub
parent b2070a9407
commit 68927d4fd3
8 changed files with 102 additions and 8 deletions
+3 -1
View File
@@ -101,7 +101,9 @@ protected:
const V3Number& num = nodep->num();
UASSERT_OBJ(!num.isFourState(), nodep, "4-state value in constant pool");
const AstNodeDType* const dtypep = nodep->dtypep();
if (num.isString()) {
if (num.isNull()) {
puts("VlNull{}");
} else if (num.isString()) {
// Note: putsQuoted does not track indentation, so we use this instead
puts("\"");
puts(num.toString());