Claudio Russo

Results 150 issues of Claudio Russo

Consider: ``` public func find( map : AssocList, key : K, equal : (K, K) -> Bool ) : ?V { switch (map) { case (?((hd_k, hd_v), tl)) { if...

performance
opportunity

Paul reported a 1600Kloc project taking 22s to compile with ir-checking, 2s without. moc version 0.6.6 https://dfinity.slack.com/archives/C02B1B4NG8G/p1631038938046500

performance

``` let t = 1; let u = t; //ok class C() { let v = t; //cannot infer type of forward variable t }; ```

Bug
typing
P3

Looks like we have a bug in the type checker that is allowing these examples: ``` actor { func f() : async () {loop ()}; // legal func g() :...

Bug

``` import { debugPrint; principalOfActor } = "mo:⛔"; actor class C() = Self { debugPrint "So far so good!" } ``` produces ``` type error [M0055], cannot infer type of...

Bug
typing

Tentative repro extracted from: https://github.com/sardariuss/MotokoStableBTree/pull/4/files#diff-cf7292a6830f875cef1c27b6375d4e4ce3575115ac20a60cbecf68426206d030R67 ``` import Region "mo:base/Region"; import Blob "mo:base/Blob"; module { public let STABLE_MEMORY = class(r : Region) { // Suspect class public func size() : Nat64...

Bug

``` let hash = Hash.hash ``` produces two deprecation warnings, while ``` let hash : Nat -> Nat32 = Hash.hash ``` only one. Don't warn during inference, perhaps?

Bug

https://forum.dfinity.org/t/type-error-m0139-inner-actor-classes-are-not-supported-yet/18135/19 TBC ``` import Debug "mo:base/Debug"; shared (deployer) actor class Test() { public shared (context) func test(): async () { await async { Debug.trap(""); }; }; }; ``` Crashes in...

Bug

https://forum.dfinity.org/t/type-error-m0139-inner-actor-classes-are-not-supported-yet/18135/12 Fixed by #3741 but in a hacky way. Leaving issue open for a more principled fix. See discussion in #3471.

Bug