Fix emitting `this` (#5849)
This commit is contained in:
parent
78198d90e1
commit
53151d7c5f
|
|
@ -634,6 +634,7 @@ class EmitVBaseVisitorConst VL_NOT_FINAL : public EmitCBaseVisitorConst {
|
||||||
iterateAndNextConstNull(nodep->fromp());
|
iterateAndNextConstNull(nodep->fromp());
|
||||||
puts(cvtToStr(nodep->declRange()));
|
puts(cvtToStr(nodep->declRange()));
|
||||||
}
|
}
|
||||||
|
void visit(AstThisRef* nodep) override { puts("this"); }
|
||||||
void visit(AstTypedef* nodep) override {
|
void visit(AstTypedef* nodep) override {
|
||||||
putfs(nodep, "typedef ");
|
putfs(nodep, "typedef ");
|
||||||
iterateConstNull(nodep->subDTypep());
|
iterateConstNull(nodep->subDTypep());
|
||||||
|
|
|
||||||
|
|
@ -331,6 +331,9 @@ package Vt_debug_emitv___024unit;
|
||||||
int signed member;
|
int signed member;
|
||||||
member = 'sh1;
|
member = 'sh1;
|
||||||
task method;
|
task method;
|
||||||
|
if ((this != this)) begin
|
||||||
|
$stop;
|
||||||
|
end
|
||||||
endtask
|
endtask
|
||||||
function new;
|
function new;
|
||||||
endfunction
|
endfunction
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ endpackage
|
||||||
class Cls;
|
class Cls;
|
||||||
int member = 1;
|
int member = 1;
|
||||||
function void method;
|
function void method;
|
||||||
|
if (this != this) $stop;
|
||||||
endfunction
|
endfunction
|
||||||
endclass
|
endclass
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue