sub foo(arg as object) : end sub
sub bar() : end sub
foo(bar) ' runtime error
brs would throw an ugly error. RBI allows this type-casting, so we should too!
This error was actually getting thrown a bunch in the sister project, https://github.com/hulu/roca, since brs@0.44.0, because all the describe and it functions use the as object type for functions.
This probably would have been caught if I released an RC last week instead of a full version. 🤔 perhaps we should make that part of the release flow?
Changes
This fixes a bug where if you tried to do:
brs
would throw an ugly error. RBI allows this type-casting, so we should too!This error was actually getting thrown a bunch in the sister project, https://github.com/hulu/roca, since
brs@0.44.0
, because all thedescribe
andit
functions use theas object
type for functions.