Skip to content

Commit

Permalink
[tests] add test for #7282
Browse files Browse the repository at this point in the history
  • Loading branch information
kLabz committed Nov 29, 2023
1 parent 0809c0d commit 7bcbb25
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/server/src/cases/issues/Issue7282.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package cases.issues;

class Issue7282 extends TestCase {
function test(_) {
vfs.putContent("Main.hx", getTemplate("issues/Issue7282/Main.hx"));
var args = ["-main", "Main"];
runHaxe(args);
assertSuccess();
runHaxeJsonCb(args, DisplayMethods.Diagnostics, {file: new FsPath("Main.hx")}, res -> {
Assert.equals("Unused variable", (cast res[0].diagnostics[0].args).description);
});
}
}
10 changes: 10 additions & 0 deletions tests/server/test/templates/issues/Issue7282/Main.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import haxe.ds.Option;

class Main {
public static function main() {
switch ((null:Option<Int>)) {
case Some(value):
case None:
}
}
}

0 comments on commit 7bcbb25

Please sign in to comment.