fail_mix_in_impl.carbon 563 B

12345678910111213141516171819202122232425
  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. __mixin Operations {
  8. fn Square[self: Self](x:i32) -> i32{
  9. return x * x;
  10. }
  11. }
  12. interface A {
  13. fn F();
  14. }
  15. external impl i32 as A {
  16. // CHECK:STDERR: SYNTAX ERROR: explorer/testdata/mixin/fail_mix_in_impl.carbon:[[@LINE+1]]: syntax error, unexpected MIX
  17. __mix Operations;
  18. fn F() {}
  19. }
  20. fn Main() -> i32 { return 0; }