@@ -33,79 +33,129 @@ Expr <RaiseExpr test.lkt:2:22-2:50>
33
33
Expr <ParenExpr test.lkt:2:21-2:51>
34
34
has type <EnumTypeDecl prelude: "Bool">
35
35
36
- Id <RefId "Bool" test.lkt:5:21-5:25 >
36
+ Id <RefId "Bool" test.lkt:3:14-3:18 >
37
37
references <EnumTypeDecl prelude: "Bool">
38
38
39
- Id <RefId "PropertyError" test.lkt:5 :28-5 :41>
39
+ Id <RefId "PropertyError" test.lkt:3 :28-3 :41>
40
40
references <StructDecl prelude: "PropertyError">
41
41
42
- Expr <StringLit test.lkt:5 :42-5 :49>
42
+ Expr <StringLit test.lkt:3 :42-3 :49>
43
43
has type <StructDecl prelude: "String">
44
44
45
- test.lkt:5:28: error: Mismatched types: expected `Bool`, got `PropertyError`
46
- 5 | @invalid val prop3: Bool = PropertyError("error")
47
- | ^^^^^^^^^^^^^^^^^^^^^^
45
+ Expr <CallExpr test.lkt:3:28-3:50>
46
+ has type <StructDecl prelude: "PropertyError">
47
+
48
+ Expr <ParenExpr test.lkt:3:27-3:51>
49
+ has type <StructDecl prelude: "PropertyError">
50
+
51
+ Expr <RaiseExpr test.lkt:3:21-3:51>
52
+ has type <EnumTypeDecl prelude: "Bool">
53
+
54
+ Id <RefId "Bool" test.lkt:4:14-4:18>
55
+ references <EnumTypeDecl prelude: "Bool">
56
+
57
+ Id <RefId "PropertyError" test.lkt:4:30-4:43>
58
+ references <StructDecl prelude: "PropertyError">
59
+
60
+ Expr <StringLit test.lkt:4:44-4:51>
61
+ has type <StructDecl prelude: "String">
62
+
63
+ Expr <CallExpr test.lkt:4:30-4:52>
64
+ has type <StructDecl prelude: "PropertyError">
65
+
66
+ Expr <ParenExpr test.lkt:4:29-4:53>
67
+ has type <StructDecl prelude: "PropertyError">
48
68
49
- Id <RefId "Bool" test.lkt:6:21-6:25>
69
+ Expr <ParenExpr test.lkt:4:28-4:54>
70
+ has type <StructDecl prelude: "PropertyError">
71
+
72
+ Expr <ParenExpr test.lkt:4:27-4:55>
73
+ has type <StructDecl prelude: "PropertyError">
74
+
75
+ Expr <RaiseExpr test.lkt:4:21-4:55>
76
+ has type <EnumTypeDecl prelude: "Bool">
77
+
78
+ Id <RefId "Bool" test.lkt:12:21-12:25>
50
79
references <EnumTypeDecl prelude: "Bool">
51
80
52
- Id <RefId "PropertyError" test.lkt:6:29-6:42>
81
+ test.lkt:12:28: error: cannot call PropertyError outside of a raise expression
82
+ 12 | @invalid val prop7: Bool = PropertyError("error")
83
+ | ^^^^^^^^^^^^^^^^^^^^^^
84
+
85
+ Id <RefId "PropertyError" test.lkt:12:28-12:41>
86
+ references <StructDecl prelude: "PropertyError">
87
+
88
+ Expr <StringLit test.lkt:12:42-12:49>
89
+ has type <StructDecl prelude: "String">
90
+
91
+ test.lkt:12:28: error: Mismatched types: expected `Bool`, got `PropertyError`
92
+ 12 | @invalid val prop7: Bool = PropertyError("error")
93
+ | ^^^^^^^^^^^^^^^^^^^^^^
94
+
95
+ Id <RefId "Bool" test.lkt:13:21-13:25>
96
+ references <EnumTypeDecl prelude: "Bool">
97
+
98
+ test.lkt:13:29: error: cannot call PropertyError outside of a raise expression
99
+ 13 | @invalid val prop8: Bool = (PropertyError("error"))
100
+ | ^^^^^^^^^^^^^^^^^^^^^^
101
+
102
+ Id <RefId "PropertyError" test.lkt:13:29-13:42>
53
103
references <StructDecl prelude: "PropertyError">
54
104
55
- Expr <StringLit test.lkt:6 :43-6 :50>
105
+ Expr <StringLit test.lkt:13 :43-13 :50>
56
106
has type <StructDecl prelude: "String">
57
107
58
- test.lkt:6 :29: error: Mismatched types: expected `Bool`, got `PropertyError`
59
- 6 | @invalid val prop4 : Bool = (PropertyError("error"))
60
- | ^^^^^^^^^^^^^^^^^^^^^^
108
+ test.lkt:13 :29: error: Mismatched types: expected `Bool`, got `PropertyError`
109
+ 13 | @invalid val prop8 : Bool = (PropertyError("error"))
110
+ | ^^^^^^^^^^^^^^^^^^^^^^
61
111
62
- test.lkt:6 :28: error: Mismatched types: expected `Bool`, got `PropertyError`
63
- 6 | @invalid val prop4 : Bool = (PropertyError("error"))
64
- | ^^^^^^^^^^^^^^^^^^^^^^^^
112
+ test.lkt:13 :28: error: Mismatched types: expected `Bool`, got `PropertyError`
113
+ 13 | @invalid val prop8 : Bool = (PropertyError("error"))
114
+ | ^^^^^^^^^^^^^^^^^^^^^^^^
65
115
66
- Id <RefId "Bool" test.lkt:8 :14-8 :18>
116
+ Id <RefId "Bool" test.lkt:15 :14-15 :18>
67
117
references <EnumTypeDecl prelude: "Bool">
68
118
69
- Id <RefId "Int" test.lkt:9 :11-9 :14>
119
+ Id <RefId "Int" test.lkt:16 :11-16 :14>
70
120
references <StructDecl prelude: "Int">
71
121
72
- Expr <NumLit test.lkt:9 :17-9 :18>
122
+ Expr <NumLit test.lkt:16 :17-16 :18>
73
123
has type <StructDecl prelude: "Int">
74
124
75
- Id <RefId "PropertyError" test.lkt:11 :10-11 :23>
125
+ Id <RefId "PropertyError" test.lkt:18 :10-18 :23>
76
126
references <StructDecl prelude: "PropertyError">
77
127
78
- Expr <StringLit test.lkt:11 :24-11 :40>
128
+ Expr <StringLit test.lkt:18 :24-18 :40>
79
129
has type <StructDecl prelude: "String">
80
130
81
- Expr <CallExpr test.lkt:11 :10-11 :41>
131
+ Expr <CallExpr test.lkt:18 :10-18 :41>
82
132
has type <StructDecl prelude: "PropertyError">
83
133
84
- Expr <RaiseExpr test.lkt:11 :4-11 :41>
134
+ Expr <RaiseExpr test.lkt:18 :4-18 :41>
85
135
has type <EnumTypeDecl prelude: "Bool">
86
136
87
- Expr <BlockExpr test.lkt:8 :21-12 :2>
137
+ Expr <BlockExpr test.lkt:15 :21-19 :2>
88
138
has type <EnumTypeDecl prelude: "Bool">
89
139
90
- Id <RefId "Int" test.lkt:15 :8-15 :11>
140
+ Id <RefId "Int" test.lkt:22 :8-22 :11>
91
141
references <StructDecl prelude: "Int">
92
142
93
- Expr <NumLit test.lkt:15 :14-15 :15>
143
+ Expr <NumLit test.lkt:22 :14-22 :15>
94
144
has type <StructDecl prelude: "Int">
95
145
96
- Id <RefId "Bool" test.lkt:16:23-16:27 >
146
+ Id <RefId "Bool" test.lkt:23:24-23:28 >
97
147
references <EnumTypeDecl prelude: "Bool">
98
148
99
- test.lkt:16:36 : error: raised expression needs to be of type `PropertyError`, got `Int`
100
- 16 | @invalid fun prop6 (): Bool = raise i
101
- | ^
149
+ test.lkt:23:37 : error: raised expression needs to be of type `PropertyError`, got `Int`
150
+ 23 | @invalid fun prop10 (): Bool = raise i
151
+ | ^
102
152
103
- Id <RefId "i" test.lkt:16:36-16:37 >
104
- references <ValDecl "i" test.lkt:15 :1-15 :15>
153
+ Id <RefId "i" test.lkt:23:37-23:38 >
154
+ references <ValDecl "i" test.lkt:22 :1-22 :15>
105
155
106
- Expr <RefId "i" test.lkt:16:36-16:37 >
156
+ Expr <RefId "i" test.lkt:23:37-23:38 >
107
157
has type <StructDecl prelude: "Int">
108
158
109
- Expr <RaiseExpr test.lkt:16:30-16:37 >
159
+ Expr <RaiseExpr test.lkt:23:31-23:38 >
110
160
has type <EnumTypeDecl prelude: "Bool">
111
161
0 commit comments