Float support and dfx

Hello

I wanted to raise a possible issue about Float support, this piece of code compiles with some compile_lit log appearing.

    public query func getFloat(): async Float {
       0.0
    };

When calling this function, I receive an error with a TODO: compile_lit

Error: Query failed:
  Status: rejected
  Message: IC0503: Canister 17113599492783913909 trapped explicitly: TODO: compile_lit
2 Likes

Thanks David! There isn’t full support for float data types yet, so best avoid using them in your projects just for the moment.

2 Likes

Some details on this here: https://sdk.dfinity.org/developers-guide/sdk-release-notes.html#_known_issues_and_limitations

2 Likes