Currently, a function call such as the one in the example is not possible:
The type provided as the placeholder of foo is a complex type literal (not just a type name). To address this, the parser and the implementation need to be adjusted to handle type literals instead of type names.