summaryrefslogtreecommitdiff
path: root/src/passes/Print.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r--src/passes/Print.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp
index 47db029ab..dbe4f2557 100644
--- a/src/passes/Print.cpp
+++ b/src/passes/Print.cpp
@@ -2496,7 +2496,7 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> {
}
o << ')';
}
- void handleHeapType(HeapType type) {
+ void handleHeapType(HeapType type, Module* module) {
if (type.isSignature()) {
handleSignature(type.getSignature());
} else if (type.isArray()) {
@@ -2506,6 +2506,12 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> {
} else {
o << type;
}
+ HeapType super;
+ if (type.getSuperType(super)) {
+ o << " (extends ";
+ TypeNamePrinter(o, module).print(super);
+ o << ')';
+ }
}
void visitExport(Export* curr) {
o << '(';
@@ -2889,7 +2895,7 @@ struct PrintSExpression : public UnifiedExpressionVisitor<PrintSExpression> {
printMedium(o, "type") << ' ';
TypeNamePrinter(o, curr).print(type);
o << ' ';
- handleHeapType(type);
+ handleHeapType(type, curr);
o << ")" << maybeNewLine;
}
ModuleUtils::iterImportedMemories(