Allow out-of-line operator definitions
This commit is contained in:
parent
06bfbe2a06
commit
40292bfced
|
|
@ -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