Open intellifactory-bb opened 9 years ago
Looks like the use of this property is correctly compiled, but the definition is compiled as-if a function.
Original comment by: Anton Tayanovskyy
Upon further investigation, something incorrect happens with the [<Inline;JavaScript>]
definition that is given on tag.Canvas.
If I manually expand the example, it works:
let Canvas : seq<IPagelet> -> _ = HTML5.Tags.NewTag "Canvas"
Minimal repro not involving Canvas:
module Client =
[<JavaScript>]
let F x y = x + 1
[<Inline; JavaScript>]
let G y = F 0 y
[<JavaScript>]
let H = G
[<JavaScript>]
let Main () =
JavaScript.Log(H 1)
Div []
Original comment by: Anton Tayanovskyy
Oops, actually still fails without Inline. Investigating.
Original comment by: Anton Tayanovskyy
Let us see how the discussion goes on the F# repo: https://github.com/fsharp/fsharp/issues/321
We have some ad-hoc heuristics to recover from this situation, but apparently they still have holes. It would be very nice to simply fix the source of the error in the F# compiler. Or at least find a systematic strategy to recover.
Original comment by: Anton Tayanovskyy
Lets say we have this alias
then if use it like this
it will raise an error like this
on the client side.