rewrite rules: analysis error on wrong type annotation