Added TypeCheckTypeExp() and changed function type literal and similar type-checking logic to use the new function (#1256)

This commit is contained in:
pk19604014
2022-05-23 16:26:35 -07:00
committed by GitHub
parent cdc9428984
commit f0a34e4bf7
8 changed files with 117 additions and 49 deletions
+2 -5
View File
@@ -10,11 +10,8 @@
package ExplorerTest api;
interface Vector(Scalar:! Type) {
}
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/impl/fail_impl_as_parameterized.carbon:[[@LINE+1]]: expected constraint after `as`, found value of type Vector
external impl i32 as Vector {}
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/impl/fail_impl_as_parameterized.carbon:[[@LINE+1]]: expected constraint after `as`, found value of type String
external impl i32 as String {}
fn Main() -> i32 {
}