Quantcast
Channel: ReScript Forum - Latest posts
Viewing all articles
Browse latest Browse all 2592

How does @inline actually work?

$
0
0

thanks.

it actually does work with functions because my js output changes with it:

@inline let add = (a: t, b: t): t => fromMillis(a->toMillis + b->toMillis)

if i remove inline:

-  return d$1 + h$1 + m$2 + s$2 + ms$1;
+  return add(add(add(add(d$1, h$1), m$2), s$2), ms$1);

maybe i’m still not supposed to use @inline for functions?


Viewing all articles
Browse latest Browse all 2592

Trending Articles