Skip to content

Commit

Permalink
Fixed @:enum deprecation on Haxe 4.3 (#1067)
Browse files Browse the repository at this point in the history
  • Loading branch information
MAJigsaw77 authored Oct 1, 2023
1 parent 298ad2d commit 51175fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/native/tests/TestNativeEnum.hx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package tests;

// Uses native enum, which does not play nice with Dynamic - must use @:unreflective
@:unreflective
@:enum extern abstract SystemMetric(SystemMetricImpl) {
#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SystemMetric(SystemMetricImpl) {
@:native("wxSYS_MOUSE_BUTTONS") var MOUSE_BUTTONS;
@:native("wxSYS_OS") var OS;
}
Expand All @@ -13,7 +13,7 @@ extern class SystemMetricImpl { }


// Wraps enum in struct, which does play nice...
@:enum extern abstract SystemMetricStruct(SystemMetricStructImpl) {
#if (haxe_ver >= 4.0) extern enum #else @:extern @:enum #end abstract SystemMetricStruct(SystemMetricStructImpl) {
@:native("wxSYS_MOUSE_BUTTONS") var MOUSE_BUTTONS;
@:native("wxSYS_OS") var OS;
}
Expand Down
3 changes: 1 addition & 2 deletions tools/hxcpp/CopyFile.hx
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ class CopyFile
}
}

@:enum
abstract Overwrite(String) from String to String
#if (haxe_ver >= 4.0) enum #else @:enum #end abstract Overwrite(String) from String to String
{
var ALWAYS = "always";
var IF_NEWER = "ifNewer";
Expand Down

0 comments on commit 51175fc

Please sign in to comment.