MrSmith33 / vox

Vox language compiler. AOT / JIT / Linker. Zero dependencies
Boost Software License 1.0
327 stars 18 forks source link

fe.ast.expr.type_conv:226: ICE: TODO fi_i #34

Closed rempas closed 2 years ago

rempas commented 2 years ago

I'm having an error that from what I understand has to do with casting. The code is the following:

alias time_t = i64;

struct timespec {
  time_t  tv_sec;     /* seconds */
  i64     tv_nsec;    /* nanoseconds */
}

i64 time_diff(timespec* start, timespec* end) {
  return (end.tv_sec - start.tv_sec) * cast(i64)1e9 + (end.tv_nsec - start.tv_nsec);
}

Of course this is always a part of the code. Line 9 causes the error