File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -277,10 +277,11 @@ impl Compiler {
277
277
278
278
let mut variant_index = 0 ;
279
279
if data. variant {
280
- let module_scope = self . higher_scopes . last_mut ( ) . unwrap_or ( & mut self . scope ) ;
281
- variant_index = module_scope. data_variants . len ( ) ;
282
- let name = data. name . as_ref ( ) . unwrap ( ) . value . clone ( ) ;
283
- module_scope. data_variants . insert ( name) ;
280
+ if let Some ( name) = data. name . as_ref ( ) {
281
+ let module_scope = self . higher_scopes . last_mut ( ) . unwrap_or ( & mut self . scope ) ;
282
+ variant_index = module_scope. data_variants . len ( ) ;
283
+ module_scope. data_variants . insert ( name. value . clone ( ) ) ;
284
+ }
284
285
}
285
286
286
287
// Make getters
Original file line number Diff line number Diff line change @@ -182,4 +182,6 @@ F ← |0.1000 ⍢(F F F|1)
182
182
183
183
°⊸(⌝⤸0) ⇡3 °△3_3
184
184
185
- ⊥1 5
185
+ ⊥1 5
186
+
187
+ |
You can’t perform that action at this time.
0 commit comments