basic.carbon 809 B

1234567891011121314151617181920212223242526272829
  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. interface I {
  7. fn Assoc();
  8. }
  9. // There are no interesting runtime operations here, but there's no rule saying
  10. // you can't pass a facet around at runtime, so make sure it works.
  11. fn F(T: I) -> I { return T; }
  12. interface J;
  13. // Declared-but-not-defined interfaces are still complete types.
  14. fn G(T: J) {}
  15. // CHECK:STDOUT: ; ModuleID = 'basic.carbon'
  16. // CHECK:STDOUT: source_filename = "basic.carbon"
  17. // CHECK:STDOUT:
  18. // CHECK:STDOUT: define void @F() {
  19. // CHECK:STDOUT: ret void
  20. // CHECK:STDOUT: }
  21. // CHECK:STDOUT:
  22. // CHECK:STDOUT: define void @G() {
  23. // CHECK:STDOUT: ret void
  24. // CHECK:STDOUT: }