dfinity / motoko

Simple high-level language for writing Internet Computer canisters
Apache License 2.0
514 stars 97 forks source link

Can't compile `base` library #4436

Open vporton opened 8 months ago

vporton commented 8 months ago

In my Code text editor I have for line 124 of base 0.10.3 ExperimentalCycles.mo:

  public let add : (amount : Nat) -> () = Prim.cyclesAdd;

the error:

expression of type
  <system>Nat -> Nat
cannot produce expected type
  Nat -> Nat
$ moc --version
Motoko compiler 0.11.0+ (source yh3wb1vx-vj8j4j32-k8gq4m8y-4cxlqinf)
rvanasa commented 8 months ago

Try upgrading the base library to 0.11.0; this should fix the issue.

Context: developer forum post