Skip to content

Commit

Permalink
fixed missing testcase file
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Nov 25, 2024
1 parent e943f0c commit 109c048
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions testcases/methods/Demo.hx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package testcases.methods;

class Demo {
function doSomething(cond:Bool, val:Int, text:Null<String>):Float {
if (cond && text == null) {
return 0.0;
}
doNothing();
trace("I'm here");
doNothing();
trace("yep, still here");
doNothing();
return switch [cond, val] {
case [true, 0]:
std.Math.random() * val;
case [true, _]:
val + val;
case [false, 10]:
Std.parseFloat(text);
case [_, _]:
std.Math.NEGATIVE_INFINITY;
}
}

function doNothing() {}
}

0 comments on commit 109c048

Please sign in to comment.