Allow out-of-line operator definitions

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Peter Li 2026-10-31 11:33:41 -07:00
parent 9f5cfebc17
commit 49c38a40a1
1 changed files with 1 additions and 1 deletions

View File

@ -1901,7 +1901,7 @@ pub const Sema = struct {
s.err(d.loc, "overloading '{s}' is not allowed", .{name});
return;
};
if (owner == null) {
if (owner == null and f.name.parts.len == 1) {
s.err(d.loc, "overloading non-member '{s}' is not allowed", .{name});
return;
}