Skip to content

Commit 900a71e

Browse files
committed
Fix debug_ast crashing with some Strings
1 parent 757472e commit 900a71e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

debugger.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,9 @@ inline void debug_ast(AST_Node* node, string ind = "", Env* env = 0)
499499
} else if (dynamic_cast<String_Constant*>(node)) {
500500
String_Constant* expression = dynamic_cast<String_Constant*>(node);
501501
cerr << ind << "String_Constant " << expression;
502-
cerr << " " << expression->concrete_type() <<
502+
if (expression->concrete_type()) {
503+
cerr << " " << expression->concrete_type();
504+
}
503505
cerr << " (" << pstate_source_position(node) << ")";
504506
cerr << " [" << prettyprint(expression->value()) << "]";
505507
if (expression->is_delayed()) cerr << " [delayed]";

0 commit comments

Comments
 (0)