form.carbon 1.3 KB

123456789101112131415161718192021222324252627
  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. // INCLUDE-FILE: toolchain/testing/testdata/min_prelude/convert.carbon
  6. //
  7. // AUTOUPDATE
  8. // TIP: To test this file alone, run:
  9. // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/let/form.carbon
  10. // TIP: To dump output, run:
  11. // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/let/form.carbon
  12. // --- fail_todo_form_binding.carbon
  13. library "[[@TEST_NAME]]";
  14. // CHECK:STDERR: fail_todo_form_binding.carbon:[[@LINE+11]]:9: error: cannot implicitly convert expression of type `()` to `Core.Form` [ConversionFailure]
  15. // CHECK:STDERR: let x:? () = ();
  16. // CHECK:STDERR: ^~
  17. // CHECK:STDERR: fail_todo_form_binding.carbon:[[@LINE+8]]:9: note: type `()` does not implement interface `Core.ImplicitAs(Core.Form)` [MissingImplInMemberAccessInContext]
  18. // CHECK:STDERR: let x:? () = ();
  19. // CHECK:STDERR: ^~
  20. // CHECK:STDERR:
  21. // CHECK:STDERR: fail_todo_form_binding.carbon:[[@LINE+4]]:5: error: semantics TODO: `support local form bindings` [SemanticsTodo]
  22. // CHECK:STDERR: let x:? () = ();
  23. // CHECK:STDERR: ^~~~~~
  24. // CHECK:STDERR:
  25. let x:? () = ();