Typed literal within record literal

is this somehow possible? @claudio

  let http_response = await ic.http_request({
      url = "https://postman-echo.com/get";
      method = #get;
      max_response_bytes = 10 : ?Nat64; // this doesnt work :(
      body = null;
      transform = null;
      headers = [];
    });
1 Like

Isn’t it:

max_response_bytes = ?10 : ?Nat64; 
2 Likes

yes :smiley: many thanks and 20 chars!

the compiler/ language plugin feedback is a bit vague though, when using 10 instead if ?10.


imo it would make more sense to say

literal of type
  Nat64
does not have expected type
  ?Nat64