Skip to content

Commit

Permalink
Assert.exception: check if type is null (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
RealyUniqueName committed Dec 20, 2023
1 parent a7e1eab commit 9a5ea19
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utest/Assert.hx
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ class Assert {
}

static function _raisesImpl(method:() -> Void, type:Any, condition : (Dynamic)->Bool, msgNotThrown : String , msgWrongType : String, pos : PosInfos) {
var typeDescr = "of type " + Type.getClassName(type);
var typeDescr = type == null ? '' : "of type " + Type.getClassName(type);
inline function handleCatch(ex:Any):Bool {
return if(null == type) {
pass(pos);
Expand Down

0 comments on commit 9a5ea19

Please sign in to comment.