fail_param_name_conflict.carbon 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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} %{carbon-run-semantics}
  7. // CHECK:STDOUT: cross_reference_irs_size: 1
  8. // CHECK:STDOUT: calls: [
  9. // CHECK:STDOUT: ]
  10. // CHECK:STDOUT: callables: [
  11. // CHECK:STDOUT: {param_ir: block1, param_refs: block2},
  12. // CHECK:STDOUT: ]
  13. // CHECK:STDOUT: integer_literals: [
  14. // CHECK:STDOUT: ]
  15. // CHECK:STDOUT: real_literals: [
  16. // CHECK:STDOUT: ]
  17. // CHECK:STDOUT: strings: [
  18. // CHECK:STDOUT: a,
  19. // CHECK:STDOUT: Bar,
  20. // CHECK:STDOUT: ]
  21. // CHECK:STDOUT: nodes: [
  22. // CHECK:STDOUT: {kind: VarStorage, type: nodeIntegerType},
  23. // CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+0, type: nodeIntegerType},
  24. // CHECK:STDOUT: {kind: VarStorage, type: nodeIntegerType},
  25. // CHECK:STDOUT: {kind: BindName, arg0: str0, arg1: node+2, type: nodeIntegerType},
  26. // CHECK:STDOUT: {kind: FunctionDeclaration, arg0: str1, arg1: callable0},
  27. // CHECK:STDOUT: {kind: FunctionDefinition, arg0: node+4, arg1: block0},
  28. // CHECK:STDOUT: ]
  29. // CHECK:STDOUT: node_blocks: [
  30. // CHECK:STDOUT: [
  31. // CHECK:STDOUT: ],
  32. // CHECK:STDOUT: [
  33. // CHECK:STDOUT: node+0,
  34. // CHECK:STDOUT: node+1,
  35. // CHECK:STDOUT: node+2,
  36. // CHECK:STDOUT: node+3,
  37. // CHECK:STDOUT: ],
  38. // CHECK:STDOUT: [
  39. // CHECK:STDOUT: node+1,
  40. // CHECK:STDOUT: node+3,
  41. // CHECK:STDOUT: ],
  42. // CHECK:STDOUT: [
  43. // CHECK:STDOUT: node+4,
  44. // CHECK:STDOUT: node+5,
  45. // CHECK:STDOUT: ],
  46. // CHECK:STDOUT: ]
  47. // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon:[[@LINE+2]]:16: Redefining a in the same scope.
  48. // CHECK:STDERR: {{.*}}/toolchain/semantics/testdata/function/definition/fail_param_name_conflict.carbon:[[@LINE+1]]:8: Previous definition is here.
  49. fn Bar(a: i32, a: i32) {}