Fix null reference error in evaluator
This commit is contained in:
parent
b0450d3bf5
commit
f504a8706e
|
@ -632,7 +632,11 @@ namespace Upsilon.Evaluator
|
||||||
while (enumerator.MoveNext())
|
while (enumerator.MoveNext())
|
||||||
{
|
{
|
||||||
var current = enumerator.Current;
|
var current = enumerator.Current;
|
||||||
if (current == null || current.Type != Type.Table)
|
if (current == null)
|
||||||
|
{
|
||||||
|
throw new Exception($"Can't assign result value of nothing to multiple values");
|
||||||
|
}
|
||||||
|
if (current.Type != Type.Table)
|
||||||
{
|
{
|
||||||
throw new Exception($"Can't assign result value with type '{current.Type}' to multiple values");
|
throw new Exception($"Can't assign result value with type '{current.Type}' to multiple values");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue