I don't think your example has much to do with typing. The types of foo and fooo can be inferred from the return types of bar and baz, so in a language that supports type inference (e.g. Scala), no annotations are necessary.
As for whether "fooo" is a valid symbol, whether you can declare a variable without a keyword is unrelated to the type system. See, e.g., Go, which has different operators for declaration-with-assignment and reassignment (:= vs. =), but this is merely a syntactical safety net, not an outright necessity.
Comments
I don't think your example has much to do with typing. The types of foo and fooo can be inferred from the return types of bar and baz, so in a language that supports type inference (e.g. Scala), no annotations are necessary.
As for whether "fooo" is a valid symbol, whether you can declare a variable without a keyword is unrelated to the type system. See, e.g., Go, which has different operators for declaration-with-assignment and reassignment (:= vs. =), but this is merely a syntactical safety net, not an outright necessity.