mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Implement support for rewrite constraints (#2276)
Implements basic support for rewrite constraints as proposed in #2173. Support for associated constants and complex constraints in general is also made more robust: argument deduction now properly computes and substitutes witnesses, and interface declarations track a more correct description of the constraint that they introduce than the one we previously built.
This commit is contained in:
@@ -13,7 +13,6 @@ fn id[T:! Type](x: i32) -> i32 {
|
||||
}
|
||||
|
||||
fn Main() -> i32 {
|
||||
// CHECK:COMPILATION ERROR: {{.*}}/explorer/testdata/generic_function/fail_type_deduction_unused.carbon:[[@LINE+2]]: could not deduce type argument for type parameter T
|
||||
// CHECK:in id(0)
|
||||
// CHECK:COMPILATION ERROR: {{.*}}/explorer/testdata/generic_function/fail_type_deduction_unused.carbon:[[@LINE+1]]: could not deduce type argument for type parameter T in call
|
||||
return id(0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user