Support 'super'.

This commit is contained in:
Wilson Snyder
2020-11-26 11:06:59 -05:00
parent 1a92a44c7d
commit a37866ee92
14 changed files with 133 additions and 39 deletions
+3
View File
@@ -1180,6 +1180,9 @@ void AstClass::dump(std::ostream& str) const {
}
AstClass* AstClassExtends::classp() const {
AstClassRefDType* refp = VN_CAST(dtypep(), ClassRefDType);
if (VL_UNLIKELY(!refp)) { // LinkDot uses this for 'super.'
refp = VN_CAST(childDTypep(), ClassRefDType);
}
UASSERT_OBJ(refp, this, "class extends non-ref");
return refp->classp();
}