deduced_params.carbon 1.2 KB

123456789101112131415161718192021222324
  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. // CHECK:STDOUT: [
  7. // CHECK:STDOUT: {kind: 'FunctionIntroducer', text: 'fn'},
  8. // CHECK:STDOUT: {kind: 'DeclaredName', text: 'foo'},
  9. // CHECK:STDOUT: {kind: 'DeducedParameterListStart', text: '['},
  10. // CHECK:STDOUT: {kind: 'DeclaredName', text: 'a'},
  11. // CHECK:STDOUT: {kind: 'Literal', text: 'i32'},
  12. // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3},
  13. // CHECK:STDOUT: {kind: 'ParameterListComma', text: ','},
  14. // CHECK:STDOUT: {kind: 'DeclaredName', text: 'b'},
  15. // CHECK:STDOUT: {kind: 'Literal', text: 'i32'},
  16. // CHECK:STDOUT: {kind: 'PatternBinding', text: ':', subtree_size: 3},
  17. // CHECK:STDOUT: {kind: 'DeducedParameterList', text: ']', subtree_size: 9},
  18. // CHECK:STDOUT: {kind: 'ParameterListStart', text: '('},
  19. // CHECK:STDOUT: {kind: 'ParameterList', text: ')', subtree_size: 2},
  20. // CHECK:STDOUT: {kind: 'FunctionDeclaration', text: ';', subtree_size: 14},
  21. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  22. // CHECK:STDOUT: ]
  23. fn foo[a: i32, b: i32]();