Breaking changes in Haxe 3.2.0 - HaxeFoundation/haxe GitHub Wiki

General

  • Xml has been unified across all targets to have consistent behavior. In particular both the parser and printer now properly deal with entity escaping in attribute values. If you relied on the quirks of the previous parsers you can use them from php/neko/cpp.NativeXml.

  • haxe.ds.Vector.get no longer returns Null<T> but T. This has to be considered when working with non-nullable types on static targets.

  • Abstract @:from methods no longer have access to the type parameters of the abstract itself. This was a bug in Haxe 3.1.3.

  • Recursive abstract @:arrayAccess methods now error instead of silently generating an array access expression.

  • There was a parser bug which caused cast (a).b to be parsed as (cast a).b instead of the intended cast ((a).b). This has been fixed but might be observed as a regression in rare cases.

  • Int64 is an abstract type now. While usage remains mostly the same, it is no longer possible to use any direct run-time reflection on it. We added Int64.is which can be used in place of Std.is(value, Int64).

  • The parser no longer accepts leading zeroes in integer literals. This has been removed in order to not give the wrong impression about Haxe supporting C's octal notation.

Flash

  • Shift operations (<<, >>) on UInt are now typed as UInt instead of Int. If the previous semantics are required the result can be type-hinted back to Int: (a << b : Int)

C#

  • Shift operations (<<, >>) on UInt are now typed as UInt instead of Int. If the previous semantics are required the result can be type-hinted back to Int: (a << b : Int)

Javascript

  • The HTML externs are now generated from a different source. Refer to https://github.com/HaxeFoundation/html-externs#haxe-32-api-migration for an overview.

  • js.Lib.alert() has been deprecated and will now generate a warning. Please use js.Browser.alert() instead.

  • js.html.EventListener now reflects the Event Listener Class, and js.html.EventTarget has been updated to accept either a js.html.EventListener or a haxe.Constraints.Function. In places where you explicitly expected an js.html.EventListener before, you should change to expect a haxe.Constraints.Function

C++

Macro

  • The status of structure extensions is now AExtend instead of AClosed.

  • Expressions returned from macros no longer have access to private fields. If you're suddenly getting Cannot access private field errors, that's probably it. To gain access to private fields, a returned expression should be wrapped in @:privateAccess metadata (see https://github.com/HaxeFoundation/haxe/issues/3714).

⚠️ **GitHub.com Fallback** ⚠️