Types in constants and variables for definitions.

This commit is contained in:
Stephen Chung
2022-09-08 10:53:55 +08:00
parent 2f7d6298e0
commit 040f28f5cd
9 changed files with 37 additions and 15 deletions

View File

@@ -1211,7 +1211,7 @@ fn all(array: Array, filter: FnPtr) -> bool;
/// let x = [1, 2, 3];
/// let y = [true, 'x'];
///
/// x.push(y);
/// x.append(y);
///
/// print(x); // prints "[1, 2, 3, true, 'x']"
/// ```
@@ -6480,8 +6480,12 @@ op |(u64, u64) -> u64;
op |(u8, u8) -> u8;
module general_kenobi {
const CONSTANT: int;
/// Returns a string where "hello there" is repeated `n` times.
fn hello_there(n: int) -> String;
}
let hello_there;
let hello_there: string;
const HELLO: string;