Global function overloading does not work properly. The typechecker actually uses the return type of the “last” function that takes the given arguments. It should resolve calls to the most specific variant.

Example app:

entity Base {}
entity Extend : Base { prop :: String }

function f(e : Extend) : Extend { return null; }
function f(e : Base) : Base { return null; }

function g() {
  
  var x : Extend;
  f(x).prop := "x";
  
}

Note that changing the declaration order of the two functions is a workaround.

Submitted by Nathan Bruning on 22 April 2010 at 01:01

On 22 April 2010 at 17:16 Nathan Bruning commented:

Fixed by revision 3856.

Log in to post comments