fail_overspecified_impl.carbon 550 B

123456789101112131415161718
  1. // Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. // Exceptions. See /LICENSE for license information.
  3. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. //
  5. // AUTOUPDATE
  6. package ExplorerTest api;
  7. interface HasType {
  8. let T:! type;
  9. }
  10. // CHECK:STDERR: COMPILATION ERROR: fail_overspecified_impl.carbon:[[@LINE+3]]: multiple different rewrites for `(i32).(HasType.T)`:
  11. // CHECK:STDERR: i32
  12. // CHECK:STDERR: {.a: i32}
  13. impl i32 as HasType where .T = i32 and .T = {.a: i32} {}
  14. fn Main() -> i32 { return 0; }