mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:54:41 +01:00
Initial support for constraints formed by combining interfaces (#1307)
Add scaffolding for constraints in general, and support specifically constraints formed by applying a `&` operator. No support for constraints formed with `where` nor for named constraints at this point.
This commit is contained in:
@@ -15,7 +15,7 @@ interface Vector {
|
||||
}
|
||||
|
||||
fn ScaleGeneric[T:! Vector](a: T, s: i32) -> T {
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/interface/fail_interface_missing_member.carbon:[[@LINE+1]]: member access, Scale not in Vector
|
||||
// CHECK: COMPILATION ERROR: {{.*}}/explorer/testdata/interface/fail_interface_missing_member.carbon:[[@LINE+1]]: member access, Scale not in interface Vector
|
||||
return a.Scale(s);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user