Webassembly Type Conversion

What is the type returned or how do I convert the type returned from the following:

var d: dynamic := Browser.GetEllementById(‘myDiv’);

// the following works
writeLn('Child Count: ’ + d.children.length);

// the following gives an “Invalid cast” exception
var I: Integer := d.children.length;

Curious. That sounds like a bug, I’d expect that to work. What’s the exact full error message? Does it say what the type is that can’t be cast to Intever? Fatal exception in WebAssembly! Exception: RemObjects.Elements.System.InvalidCastException: Invalid cast
!> Exception of type RuntimeError on thread 0001
!> Message: RuntimeError: unreachable
!> at ElementsRaiseException (wasm-function[2336]:0xa5556)
!> at mi_t17_WebAPI__Comms_d_Programf_DoOnButtonClicknad (wasm-function[2788]:0xc7582)
!> at mi_t17_WebAPI__Comms_d_Program13__l_InitGUI_g_b____1nt13__1sEcmaScriptObject (wasm-function[2785]:0xc66e9)
!> at mi_t16__1sWebAssemblyDelegate6_Invokent13__1sEcmaScriptObject (wasm-function[626]:0x61c8d)
!> at __island_call_delegate (wasm-function[2337]:0xa5581)
!> at HTMLButtonElement.res (

#> (edb)
~> Process WebAPI_Comms terminated with exit code 0

Any advice / news on this?
I have since found the the following works:

var x: Double := d.children.length;

My apologies; it seems I lost track of this one. It looks, like a bug, possibly with string concatenation on dynamics that aren’t strings. I’ll log to have this investigated.

Thanks, logged as bugs://84093

Oddly, this fails for me too, with a very weird error (logged separately):

      var d: dynamic := Browser.GetElementById('myDiv');
      var a := 'Child Count: ' + d.children.length; // works fine
      writeLn($'a {a}'); // prints it fine      
      writeLn($'Child Count: {d.children.length}'); // ok
      writeLn('Child Count: ' + d.children.length); // fails with "No element with this name: writeLn"

that said,

I can repro that .length apparently can be assigned to a Double, but not to an Integer (the original issue); not sure why yet.

bugs://84093 got closed with status fixed.