Disallowed patterns in extern fn declarations.

Fixes #10877

There was another PR which attempted to fix this in the parser (#11804), which was closed due to inactivity.
This PR modifies typeck instead (as suggested in #11804).