motoko icon indicating copy to clipboard operation
motoko copied to clipboard

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

Open Gekctek opened this issue 1 year ago • 1 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

Gekctek avatar Mar 15 '24 17:03 Gekctek

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

crusso avatar Mar 15 '24 20:03 crusso