Add type match inspection.

Also fixed `resolveTypes` method in some expression.

Added a `goTypes` field to reduce the cost of resolving.