Adding tests for typed functions rule

Woo!!!