blob: 7cc1ca501675ac5ea76eca98b621ca86af77047d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
let
var a := exit(0)
/* ^ function.builtin */
primitive exit(ret: int) /* Shadowing the prelude-included built-in */
/* ^ type.builtin */
var b := exit(0)
/* ^ function.builtin */
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')*/
var d : Object := nil
/* ^ type.builtin */
type Object = int
var self := "self"
in
let
var c : int := "This is an int"
/* ^ type.builtin (not sure why it isn't 'type')*/
var d : Object := "This is an object"
/* ^ type.builtin (not sure why it isn't 'type')*/
in
end;
exit(1);
/* <- function.builtin */
print("shadowing is fun");
/* <- function.builtin */
self;
/* <- variable.builtin */
b := print
/* ^ variable */
end
/* vim: set ft=tiger: */
|