HaxeFoundation / haxe

Haxe - The Cross-Platform Toolkit
https://haxe.org
6.04k stars 647 forks source link

Lambda.filter casting wrong on nightlybuild #7508

Closed aliokan closed 5 years ago

aliokan commented 5 years ago

Hello :)

class Test {
  static function main() {
    var a = [1,2,3];
    var l = Lambda.filter(a, function( e ) return true);
    trace(l.first());
  }
}

Working on stable version, and failing on nightly

Test.hx:5: characters 11-18 : Array has no field first

http://try-haxe.mrcdk.com/#e4201

Simn commented 5 years ago

Lambda functions return Array now instead of List. You can use -lib hx3compat to preserve the old behavior.