V error with receiver method on interface #19550
Labels
Bug
This tag is applied to issues which reports bugs.
Unit: Checker
Bugs/feature requests, that are related to the type checker.
Unit: Type System
Bugs/feature requests, that are related to the V types system.
Describe the bug
V is giving an error about the parameter to the function not implementing the interface fields. But it's testing for the wrong interface. The
fn (mut node Node) append_child(child &Node)
is what is giving the error. The compiler is expecting anElement
interface there for some reason. Using this instead wherefn append_child
is invoked does work.Reproduction Steps
Expected Behavior
output:
Current Behavior
output:
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.2 37e5616
Environment details (OS name and version, etc.)
Note
You can vote for this issue using the 👍 reaction. More votes increase the issue's priority for developers.
Take into account that only the 👍 reaction counts as a vote.
Only reactions to the issue itself will be counted as votes, not comments.
The text was updated successfully, but these errors were encountered: