Skip to content

Commit

Permalink
fix: Fixed bad list append type checking
Browse files Browse the repository at this point in the history
closes #224
  • Loading branch information
giann committed Oct 30, 2023
1 parent 961a6ed commit 81b62a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/parser.zig
Original file line number Diff line number Diff line change
Expand Up @@ -6018,7 +6018,10 @@ pub const Parser = struct {
} else if (try self.match(.Fib)) {
return try self.parseFiberType(generic_types);
} else if (try self.match(.Obj)) {
return try self.parseObjType(generic_types);
return if (instance)
try (try self.parseObjType(generic_types)).toInstance(self.gc.allocator, &self.gc.type_registry)
else
try self.parseObjType(generic_types);
} else if ((try self.match(.Identifier))) {
var user_type: ?*ObjTypeDef = null;
// Is it a generic type defined in enclosing functions or object?
Expand Down

0 comments on commit 81b62a9

Please sign in to comment.