ClojureDart icon indicating copy to clipboard operation
ClojureDart copied to clipboard

Loose type inference on functions that are type hinted

Open dupuchba opened this issue 10 months ago • 0 comments

When type hinting a function and using it, compiler looses all type inference informations. Spend some type debugging it but it should probably go into the bigger fn refactor.

(defn baptiste [^#/(String -> int) fff]
  (let [b (fff "one")]
    b))

Generates

dc.dynamic baptiste(dc.dynamic fff$1, ){
final dc.dynamic b$1=(fff$1 as dc.int Function(dc.String, ))("one", );
return b$1;
}

dupuchba avatar Apr 19 '24 08:04 dupuchba