Properly handle the mismatching "mutating" signature for implementing interfaces #4467
Labels
goal:quality & productivity
Quality issues and issues that impact our productivity coding day to day inside slang
kind:bug
something doesn't work like it should
Milestone
Problem description
When the interface declares a function with
[mutating]
, the implementation also has to have[mutating]
.If the implementation didn't have the keyword, Slang crashes with an internal error.
Goal
We should print a proper error for the mistake.
Or it should work even when the implementation didn't have the matching
[mutating]
keyword.Repro steps
The following code can reproduce the issue.
Note that the modifier
out
is required to reproduce the issue.The text was updated successfully, but these errors were encountered: