fail_intrinsic_no_args.carbon 563 B

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