Skip to content

Commit

Permalink
fix: pattern.match and matchAll badly constructed result list type
Browse files Browse the repository at this point in the history
  • Loading branch information
giann committed Feb 6, 2025
1 parent c425439 commit 64cdbe3
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/builtin/pattern.zig
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,18 @@ fn rawMatch(self: *ObjPattern, vm: *VM, subject: *ObjString, offset: *usize) !?*
ObjList,
try ObjList.init(
vm.gc.allocator,
vm.gc.type_registry.str_type,
try vm.gc.type_registry.getTypeDef(
.{
.def_type = .List,
.optional = false,
.resolved_type = .{
.List = ObjList.ListDef.init(
vm.gc.type_registry.str_type,
false,
),
},
},
),
),
);

Expand Down

0 comments on commit 64cdbe3

Please sign in to comment.