Skip to content

Commit

Permalink
Change interface method argument to pointer
Browse files Browse the repository at this point in the history
This errors in

Error: The first parameter must always be a pointer for '@dynamic' methods, so please change its type to 'Baz*' if possible.
  • Loading branch information
KMikeeU authored and lerno committed Aug 17, 2024
1 parent 07e5c0a commit 572bf8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/content/docs/references/docs/anyinterfaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ To declare that a type implements an interface, add it after the type name:
}

// Note how the first argument differs from the interface.
fn String Baz.myname(Baz self) @dynamic
fn String Baz.myname(Baz* self) @dynamic
{
return "I am Baz!";
}
Expand Down

0 comments on commit 572bf8e

Please sign in to comment.