"Error: unterminated parenthesized expression" when using function of object after parenthesis

68 Views Asked by At

i'm running into the problem:

Error: unterminated parenthesized expression when trying to compile:

expiry_epoch = (expiry_date_bytes.pointer(expiry_date_bytes.size) as Int64*).value

I'm not that comfortable with crystal so i'm better off asking.

The only fix in my mind is:

expiry_epoch = expiry_date_bytes.pointer(expiry_date_bytes.size) as Int64*
expiry_epoch = expiry_epoch.value

Thanks in advance!

1

There are 1 best solutions below

0
Johannes Müller On BEST ANSWER

That as syntax is very old and effectively obsolete by now.

You can write expiry_date_bytes.pointer(expiry_date_bytes.size).as(Int64*).value