dfinity / motoko

Simple high-level language for writing Internet Computer canisters

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error having <system> as type argument in annotations/inner types

Gekctek opened this issue · comments

Im having an issue where i have a class that requires the . Whenener I use type annotatiosn or have it in something like an hashmap type arg, it fails with in it and when its not
I have work arounds but is a pain point

Without
image
With
image
image

When you declare a class C, you define both a type constructor, C, and a value C.

The type constructor will never have the 'system' parameter, only the value.

So when you use the class name as a type, omit the system type argument. When you use it as a value (to construct an instance) provide the system parameter.

If that doesn't work in moc 0.11.0 try moc 0.11.1. 0.11.0 was a bit flakey