Release Notes

Dear Community,

On behalf of the Haxe Foundation, we are proud to announce the official release of the Haxe 4.0.0-rc.1! It is available along with the changelog at https://haxe.org/download.

The main new feature of this release is an experimental null-checker, which can be enabled for individual packages from command line by using --macro nullSafety("package.path"). We will post more information on this soon!

See the changelog below for further details. Please report any issues here: https://github.com/HaxeFoundation/haxe/issues

Thank you very much for your help!

Change Log

2019-02-01: 4.0.0-rc.1

New features:

  • all : added experimental null-safety feature through --macro nullSafety("package") (#7717)

General improvements and optimizations:

  • all : improved unification error messages (#7547)
  • all : added haxe4 define
  • all : do not require semicolon for XML literals (#7438)
  • all : made @:expose imply @:keep (#7695)
  • all : unified cast, catch and Std.is behavior of null-values (#7532)
  • macro : static variables are now always re-initialized when using the compilation server (#5746)
  • macro : support @:persistent to keep macro static values across compilations
  • js : improve js.Promise extern: now then callback argument types can be properly inferred (#7644)

Bugfixes:

  • all : fixed various pattern matching problems
  • all : fixed various wrong positions when encoding data to macros
  • all : specified String.indexOf with out-of-bounds indices (#7601)
  • all : fixed various problems related to DCE and feature-handling (#7694)
  • all : fixed bad unary operator optimization (#7704)
  • js : fixed syntax problem related to instanceof (#7653)
  • flash : fixed var field access on interfaces being uncast (#7727)
  • cpp : fixed various issues related to casts
  • cpp : fixed some leftover unicode issues
  • php : fixed class naming conflicts (#7716)
  • eval : fixed Socket.setTimeout (#7682)
  • eval : fixed int switch bug related to overflows

Removals:

  • macro : deprecated Context.registerModuleReuseCall and onMacroContextReused (#5746)