Don't cascade errors if index assignment index is error
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		| @@ -75,7 +75,8 @@ BoundStatement *Binder::BindIndexAssignmentStatement(const ParsedStatement *stat | |||||||
|     auto s = (ParsedIndexAssignmentStatement*) statement; |     auto s = (ParsedIndexAssignmentStatement*) statement; | ||||||
|     auto boundIndexExpression = this -> BindIndexExpression((IndexExpression*)s->GetIndexExpression(), true); |     auto boundIndexExpression = this -> BindIndexExpression((IndexExpression*)s->GetIndexExpression(), true); | ||||||
|     auto valueExpression = this -> BindExpression(s->GetValueExpression()); |     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()); |         this -> _scriptData -> Diagnostics -> LogError(DiagnosticCode::InvalidTableValueType, statement->GetStartPosition(), statement->GetLength()); | ||||||
|         return new BoundBadStatement(); |         return new BoundBadStatement(); | ||||||
|     } |     } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user