Allow out-of-line operator definitions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
9f5cfebc17
commit
49c38a40a1
|
|
@ -1901,7 +1901,7 @@ pub const Sema = struct {
|
||||||
s.err(d.loc, "overloading '{s}' is not allowed", .{name});
|
s.err(d.loc, "overloading '{s}' is not allowed", .{name});
|
||||||
return;
|
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});
|
s.err(d.loc, "overloading non-member '{s}' is not allowed", .{name});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue