-
-
Notifications
You must be signed in to change notification settings - Fork 704
Breaking changes in Haxe 3.2.0
-
Xmlhas 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.getno longer returnsNull<T>butT. This has to be considered when working with non-nullable types on static targets. -
Abstract
@:frommethods no longer have access to the type parameters of the abstract itself. This was a bug in Haxe 3.1.3. -
Recursive abstract
@:arrayAccessmethods now error instead of silently generating an array access expression. -
There was a parser bug which caused
cast (a).bto be parsed as(cast a).binstead of the intendedcast ((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.iswhich can be used in place ofStd.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.
- Shift operations (
<<,>>) onUIntare now typed asUIntinstead ofInt. If the previous semantics are required the result can be type-hinted back toInt:(a << b : Int)
- Shift operations (
<<,>>) onUIntare now typed asUIntinstead ofInt. If the previous semantics are required the result can be type-hinted back toInt:(a << b : Int)
-
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 usejs.Browser.alert()instead. -
js.html.EventListenernow reflects the Event Listener Class, andjs.html.EventTargethas been updated to accept either ajs.html.EventListeneror ahaxe.Constraints.Function. In places where you explicitly expected anjs.html.EventListenerbefore, you should change to expect ahaxe.Constraints.Function
- Static fields can no longer be accessed via Reflect.field on a class instance (see https://github.com/HaxeFoundation/haxe/issues/4107).
-
The status of structure extensions is now
AExtendinstead ofAClosed. -
Expressions returned from macros no longer have access to private fields. If you're suddenly getting
Cannot access private fielderrors, that's probably it. To gain access to private fields, a returned expression should be wrapped in@:privateAccessmetadata (see https://github.com/HaxeFoundation/haxe/issues/3714).
Learn Haxe: Introduction | Manual | API | Try Haxe | Haxe Library Manager | Code Cookbook
Connect: GitHub | Stack Overflow | Forum | Discord | Gitter | Twitter | Facebook