fail_alternative_with_implicit_params.carbon 1020 B

1234567891011121314151617181920212223
  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. choice X {
  7. // CHECK:STDERR: fail_alternative_with_implicit_params.carbon:[[@LINE+3]]:4: ERROR: Expected `,` or `}`.
  8. // CHECK:STDERR: A[T:! type](value: T)
  9. // CHECK:STDERR: ^
  10. A[T:! type](value: T)
  11. }
  12. // CHECK:STDOUT: - filename: fail_alternative_with_implicit_params.carbon
  13. // CHECK:STDOUT: parse_tree: [
  14. // CHECK:STDOUT: {kind: 'FileStart', text: ''},
  15. // CHECK:STDOUT: {kind: 'ChoiceIntroducer', text: 'choice'},
  16. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'X'},
  17. // CHECK:STDOUT: {kind: 'ChoiceDefinitionStart', text: '{', subtree_size: 3},
  18. // CHECK:STDOUT: {kind: 'IdentifierName', text: 'A'},
  19. // CHECK:STDOUT: {kind: 'ChoiceDefinition', text: '}', has_error: yes, subtree_size: 5},
  20. // CHECK:STDOUT: {kind: 'FileEnd', text: ''},
  21. // CHECK:STDOUT: ]