2022-06-03 21:04:40 +02:00
|
|
|
let
|
|
|
|
var a := exit(0)
|
|
|
|
/* ^ function.builtin */
|
|
|
|
|
|
|
|
primitive exit(ret: int) /* Shadowing the prelude-included built-in */
|
2022-06-03 22:04:28 +02:00
|
|
|
/* ^ type.builtin */
|
2022-06-03 21:04:40 +02:00
|
|
|
|
|
|
|
var b := exit(0)
|
|
|
|
/* ^ function */
|
|
|
|
|
2022-06-03 22:04:28 +02:00
|
|
|
type int = string /* Shadowing the built-in type */
|
|
|
|
/* ^ type.builtin */
|
|
|
|
|
|
|
|
var c : int := "This is an \"int\""
|
|
|
|
/* ^ type.builtin (not sure why it isn't 'type')*/
|
2022-06-03 21:04:40 +02:00
|
|
|
in
|
2022-06-03 22:04:28 +02:00
|
|
|
let
|
|
|
|
var c : int := "This is an int"
|
|
|
|
/* ^ type.builtin (not sure why it isn't 'type')*/
|
|
|
|
in
|
|
|
|
end;
|
|
|
|
|
2022-06-03 21:04:40 +02:00
|
|
|
exit(1);
|
|
|
|
/* <- function */
|
|
|
|
|
|
|
|
print("shadowing is fun");
|
|
|
|
/* <- function.builtin */
|
|
|
|
|
|
|
|
b := print
|
|
|
|
/* ^ variable */
|
|
|
|
end
|