does this look like a bug? I think the the debugger has issues with automatic type inference because this only fails without the cast, even though the linter tells me i shouldn't need the cast.
I noticed something similar at runtime in some other code i wrote where the type is erased, and failed when it shouldn't have