diff options
author | Qyriad <qyriad@qyriad.me> | 2024-06-24 14:33:12 -0600 |
---|---|---|
committer | Qyriad <qyriad@qyriad.me> | 2024-07-04 15:55:38 -0600 |
commit | 59bf6825ef34dd8951302fb033837c2658b2367d (patch) | |
tree | 7919c48ddcf77567eac8a2b1fe488cea18b22132 /src/libexpr/nixexpr.cc | |
parent | 4f0c27abe159c69db15f968607bc26de5ba1034f (diff) |
add an impl of Expr::show for ExprInheritFrom that doesn't crash
ExprVar::show() assumes it has a name. dynamic inherits do not
necessarily (ever?) have a name.
Change-Id: If10893188e307431da17f0c1bd0787adc74f7141
Diffstat (limited to 'src/libexpr/nixexpr.cc')
-rw-r--r-- | src/libexpr/nixexpr.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libexpr/nixexpr.cc b/src/libexpr/nixexpr.cc index bc53ca053..08d4b279b 100644 --- a/src/libexpr/nixexpr.cc +++ b/src/libexpr/nixexpr.cc @@ -50,6 +50,13 @@ void ExprVar::show(const SymbolTable & symbols, std::ostream & str) const str << symbols[name]; } +void ExprInheritFrom::show(SymbolTable const & symbols, std::ostream & str) const +{ + str << "(/* expanded inherit (expr) */ "; + fromExpr->show(symbols, str); + str << ")"; +} + void ExprSelect::show(const SymbolTable & symbols, std::ostream & str) const { str << "("; |