Types in constants and variables for definitions.
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
module static;
|
||||
|
||||
let hello_there;
|
||||
let hello_there: string;
|
||||
|
||||
const HELLO: string;
|
@@ -693,7 +693,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']"
|
||||
/// ```
|
||||
|
@@ -1,4 +1,6 @@
|
||||
module general_kenobi;
|
||||
|
||||
const CONSTANT: int;
|
||||
|
||||
/// Returns a string where "hello there" is repeated `n` times.
|
||||
fn hello_there(n: int) -> String;
|
Reference in New Issue
Block a user