Constants with custom types #662
Replies: 6 comments
-
As a workaround. A zero arg function like fn my_record(){ // your constr} is the same thing. |
Beta Was this translation helpful? Give feedback.
-
Is that so? Does it inline the value? Isn't there an additional call? Or you've meant the same thing from semantical point of view? |
Beta Was this translation helpful? Give feedback.
-
It will inline the value as a constant. |
Beta Was this translation helpful? Give feedback.
-
Zero arg functions are run at compile time. |
Beta Was this translation helpful? Give feedback.
-
We could also add this, it was supposed to be that case but some of the code got removed cause it was never implemented all the way. |
Beta Was this translation helpful? Give feedback.
-
Good to know. Thanks 🙌 |
Beta Was this translation helpful? Give feedback.
-
What Git revision are you using?
aiken v1.0.10-alpha 85d82e5
What operating system are you using, and which version?
Describe what the problem is?
I can't define a constant with a custom type.
The following code fails to parse/build:
What should be the expected behavior?
I should be able to define constants even with custom types.
Beta Was this translation helpful? Give feedback.
All reactions