Currently expect_expr will not run the expression if no target is selected. This patch changes
this behavior so that expect_expr will instead fall back to the dummy target similar to what
the expression command is doing. This way we don't have to compile an empty executable
to be able to use expect_expr (which is a waste of resources for tests that just test
generic type system features).
As a test I modernized the TestTypeOfDeclTypeExpr into a Python test + expect_expr
(as it relied on the dummy target fallback of the expression command).