class Test {
  public function demo(func:String -> Void):Void {
  }

  public function main() {
    var out = 10;

    this.demo(function(v) {
      <error descr="Can't assign String to Int">out = v</error>;
    });
  }
}

class Test {
  public function demo(func:String -> Void):Void {
  }

  public function main() {
    var out = 10;

    this.demo(<error descr="Can't assign Int -> Int to String -> Void">function(v) {
      out = v;
    }</error>);
  }
}

Update unit test for passing function literals to expect a better error message.
Update unit test for passing function literals to expect a better error message.

EricBishton/intellij-haxe,eliasku/intellij-haxe,winmain/intellij-haxe,HaxeFoundation/intellij-haxe,TiVo/intellij-haxe,TiVo/intellij-haxe,eliasku/intellij-haxe,HaxeFoundation/intellij-haxe,EricBishton/intellij-haxe,TiVo/intellij-haxe,winmain/intellij-haxe,winmain/intellij-haxe,HaxeFoundation/intellij-haxe,EricBishton/intellij-haxe,eliasku/intellij-haxe