Don't cascade errors if index assignment index is error
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
5cd05053e1
commit
f73bd2003c
|
@ -75,7 +75,8 @@ BoundStatement *Binder::BindIndexAssignmentStatement(const ParsedStatement *stat
|
|||
auto s = (ParsedIndexAssignmentStatement*) statement;
|
||||
auto boundIndexExpression = this -> BindIndexExpression((IndexExpression*)s->GetIndexExpression(), true);
|
||||
auto valueExpression = this -> BindExpression(s->GetValueExpression());
|
||||
if (boundIndexExpression->GetType()->operator!=(valueExpression->GetType().get())){
|
||||
auto boundIndexType = boundIndexExpression -> GetType();
|
||||
if (boundIndexType ->GetClass() != TypeClass ::Error && boundIndexType->operator!=(valueExpression->GetType().get())){
|
||||
this -> _scriptData -> Diagnostics -> LogError(DiagnosticCode::InvalidTableValueType, statement->GetStartPosition(), statement->GetLength());
|
||||
return new BoundBadStatement();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue