From e9f34b0fc142e1651256eb9c7a8b58339d88fa9f Mon Sep 17 00:00:00 2001 From: Rudy Ges Date: Tue, 16 May 2023 14:47:32 +0200 Subject: [PATCH] [tests] Update test for 5306 --- tests/display/src/cases/Issue5306.hx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tests/display/src/cases/Issue5306.hx b/tests/display/src/cases/Issue5306.hx index 727a6dedd2c..037684cbe31 100644 --- a/tests/display/src/cases/Issue5306.hx +++ b/tests/display/src/cases/Issue5306.hx @@ -7,8 +7,8 @@ class Issue5306 extends DisplayTestCase { class Main { static function main() { var ib:Array; - ib[0] = 0; ib[1] = 1; ib[2] - {-5-}trace{-6-}("test"); + {-5-}ib{-6-}[0] = 0; ib[1] = 1; ib[2] + {-7-}trace{-8-}("test"); } } **/ @@ -22,7 +22,7 @@ class Issue5306 extends DisplayTestCase { // }, { kind: DKParserError, - range: diagnosticsRange(pos(5), pos(6)), + range: diagnosticsRange(pos(7), pos(8)), severity: Error, code: null, relatedInformation: [], @@ -35,6 +35,14 @@ class Issue5306 extends DisplayTestCase { code: null, relatedInformation: [], args: "Type not found : InvalidType" + }, + { + kind: DKCompilerError, + range: diagnosticsRange(pos(5), pos(6)), + severity: Error, + code: null, + relatedInformation: [], + args: "Local variable ib used without being initialized" } ]; arrayEq(expected, diagnostics());