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());
|
||||
puts(cvtToStr(nodep->declRange()));
|
||||
}
|
||||
void visit(AstThisRef* nodep) override { puts("this"); }
|
||||
void visit(AstTypedef* nodep) override {
|
||||
putfs(nodep, "typedef ");
|
||||
iterateConstNull(nodep->subDTypep());
|
||||
|
|
|
|||
|
|
@ -331,6 +331,9 @@ package Vt_debug_emitv___024unit;
|
|||
int signed member;
|
||||
member = 'sh1;
|
||||
task method;
|
||||
if ((this != this)) begin
|
||||
$stop;
|
||||
end
|
||||
endtask
|
||||
function new;
|
||||
endfunction
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ endpackage
|
|||
class Cls;
|
||||
int member = 1;
|
||||
function void method;
|
||||
if (this != this) $stop;
|
||||
endfunction
|
||||
endclass
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue