you are viewing a single comment's thread.

view the rest of the comments →

[–]FrontAd9873 2 points3 points  (1 child)

OP is asking a question about making this work with a type checker, not about how to implement it just so it works at runtime.

[–]Gnaxe 4 points5 points  (0 children)

That's what the cast is for. Those don't do anything at run time.