You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ast.addDiagnostic(`Expected string or number on left hand side of operation, got ${child.left.value===null ? "null" : left_type}`,DiagnosticSeverity.Error,child.left.loc!);
ast.addDiagnostic(`Expected ${left_type} on left hand side of operation, got undefined`,DiagnosticSeverity.Error,child.right.loc!);
49
-
elseif(child.right.type===NODES.LITERAL){
55
+
if(child.right.type===NODES.LITERAL){
50
56
constright_type=typeofchild.right.value;
51
-
if(left_type!==right_type)
57
+
if(left_type!==right_type&&left_type_correct)
52
58
ast.addDiagnostic(`Expected ${left_type} on right hand side of operation, got ${child.right.value===null ? "null" : right_type}`,DiagnosticSeverity.Error,child.right.loc!);
ast.addDiagnostic(`Expected string or number on right hand side of operation, got ${right_type==="object" ? "null" : right_type}`,DiagnosticSeverity.Error,child.right.loc!);
0 commit comments