fail_value_param_mismatch.carbon 598 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. // RUN: %{not} %{explorer-run}
  7. // RUN: %{not} %{explorer-run-trace}
  8. package ExplorerTest api;
  9. class HasI32Param(V:! i32) {}
  10. fn F(x: HasI32Param(1)) {}
  11. fn Main() -> i32 {
  12. var n: HasI32Param(0) = {};
  13. // CHECK:STDERR: COMPILATION ERROR: {{.*}}/explorer/testdata/generic_class/fail_value_param_mismatch.carbon:[[@LINE+1]]: mismatch in non-type values, `0` != `1`
  14. F(n);
  15. return 0;
  16. }