diff options
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 46d519e9e..d49bc2974 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -2980,6 +2980,9 @@ void PrintSExpression::visitDefinedGlobal(Global* curr) { void PrintSExpression::visitFunction(Function* curr) { if (curr->imported()) { visitImportedFunction(curr); + } else if (curr->body == nullptr) { + // We are in the middle of parsing the module and have not parsed this + // function's code yet. Skip it. } else { visitDefinedFunction(curr); } |