Skip to content

Commit

Permalink
fix: require for Haxe 4.2 or higher
Browse files Browse the repository at this point in the history
  • Loading branch information
sebthom committed Dec 19, 2024
1 parent e72ca20 commit 0744fb1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,6 @@ jobs:
- nightly
- 4.3.6
- 4.2.5
- 4.1.5
- 4.0.5
with:
haxe-reusable-workflows-version: dev

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ within FlashDevelop.
|0.1.0 to 1.1.4 |3.2.1 or higher|
|1.2.0 to 2.0.1 |3.4.2 or higher|
|3.0.0 or higher |4.0.5 or higher|
|3.3.0 or higher |4.2.0 or higher|


## <a name="declaring-test-assertions"></a>Declaring test assertions
Expand Down
14 changes: 4 additions & 10 deletions src/hx/doctest/internal/Macros.hx
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,17 @@ import haxe.macro.*;
@:noCompletion
class Macros {

#if (haxe_ver < 4)
#if (haxe_ver < 4.2)
static var __static_init(default, never) = {
throw '[ERROR] As of haxe-doctest 3.0.0, Haxe 4.x or higher is required!';
throw '[ERROR] Haxe 4.2 or higher is required!';
};
#end


macro //
public static function configureNullSafety() {
#if (haxe_ver >= 4)
haxe.macro.Compiler.nullSafety("hx.doctest",
#if (haxe_ver < 4.1)
Strict // Haxe 4.x does not have StrictThreaded
#else
StrictThreaded
#end
);
#if (haxe_ver >= 4.2)
haxe.macro.Compiler.nullSafety("hx.doctest", StrictThreaded);
#end
return macro {}
}
Expand Down

0 comments on commit 0744fb1

Please sign in to comment.