Primitive Types
| Type | Literal syntax | Example |
|---|---|---|
Int | plain integer | 42 |
Long | integer with L suffix | 100L |
Double | decimal point, no suffix | 3.14 |
Decimal | decimal point with d suffix | 9.99d |
Bool | true / false | true |
String | double-quoted | "hello" |
Id | no literal. Runtime only | (from DML) |
Void | the keyword Void | Void |
Void is a real first-class value. A function that only produces side effects
declares : Void and ends with Void as its trailing expression.
fn log( message: String,): Void { debug message Void}No implicit widening between numeric types. Both sides of an arithmetic expression must be the same type.