mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-26 09:10:48 +01:00
[poincare] Expression for undefined symbol returns Uninitialized
This commit is contained in:
@@ -55,7 +55,7 @@ const char * GlobalContext::ExtensionForExpression(const Expression & exp) {
|
||||
|
||||
const Expression GlobalContext::ExpressionForRecord(const Ion::Storage::Record & record) {
|
||||
if (record.isNull()) {
|
||||
return Undefined();
|
||||
return Expression();
|
||||
}
|
||||
// Build the Expression in the Tree Pool
|
||||
return Expression(static_cast<ExpressionNode *>(TreePool::sharedPool()->copyTreeFromAddress(record.value().buffer, record.value().size)));
|
||||
|
||||
@@ -190,7 +190,7 @@ bool Symbol::isRegressionSymbol(const char * c) {
|
||||
|
||||
bool Symbol::matches(ExpressionTest test, Context & context) const {
|
||||
Expression e = context.expressionForSymbol(*this);
|
||||
return test(e, context);
|
||||
return !e.isUninitialized() && test(e, context);
|
||||
}
|
||||
|
||||
Expression Symbol::shallowReduce(Context & context, Preferences::AngleUnit angleUnit) {
|
||||
|
||||
Reference in New Issue
Block a user