fail_intrinsic_no_args.carbon 638 B

12345678910111213141516171819202122
  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. // RUN: %{not} %{explorer-run}
  7. // RUN: %{not} %{explorer-run-trace}
  8. package ExplorerTest api;
  9. class ConvertTo(T:! type) {
  10. var v: T;
  11. impl as ImplicitAs(T) {
  12. fn Convert[self: Self]() -> T { return self.v; }
  13. }
  14. }
  15. fn Main() -> i32 {
  16. // CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/assert/fail_intrinsic_no_args.carbon:[[@LINE+1]]: __intrinsic_assert takes 2 arguments
  17. __intrinsic_assert();
  18. return 0;
  19. }