Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Day_3_challenge type error [M0031], shared function has non-shared parameter type [Nat/3] #77

Discussion options

You must be logged in to vote

Oh, it looks like your swap_test=> you dont need the because thats for generics.

So what those brackets do is like if you wanted to use an arbitrary type to call later on you do swap_test (array:[A])
So that when you use it in another canister, the type is generic. but here youre putting in a Nat in the brackets which isnt a representation for a generic type. Also, generic functions can't be public. Make that private as well

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Lennin-A
Comment options

Answer selected by Lennin-A
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants