phase_name_resolution.carbon 2.0 KB

123456789101112131415161718192021222324252627282930313233343536
  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. package ExplorerTest api;
  5. interface TestInterface {}
  6. fn Main() -> i32 {
  7. return 0;
  8. }
  9. // Place checks after code so that line numbers are stable, reducing merge
  10. // conflicts.
  11. // ARGS: --trace_file=- --trace_phase=name_resolution %s
  12. // AUTOUPDATE
  13. // CHECK:STDOUT: * * * * * * * * * * resolving names * * * * * * * * * *
  14. // CHECK:STDOUT: ---------------------------------------------------------
  15. // CHECK:STDOUT: ==> declared `TestInterface` as `interface TestInterface` in `package` (phase_name_resolution.carbon:7)
  16. // CHECK:STDOUT: ==> declared `Main` as `fn Main` in `package` (phase_name_resolution.carbon:11)
  17. // CHECK:STDOUT: ->> resolving decl `interface TestInterface` (phase_name_resolution.carbon:7)
  18. // CHECK:STDOUT: ==> marked `TestInterface` declared but not usable in `package`
  19. // CHECK:STDOUT: ==> marked `TestInterface` usable in `package`
  20. // CHECK:STDOUT: ==> declared `Self` as `Self` in `interface TestInterface` (phase_name_resolution.carbon:7)
  21. // CHECK:STDOUT: <<- finished resolving decl `interface TestInterface` (phase_name_resolution.carbon:7)
  22. // CHECK:STDOUT: ->> resolving decl `fn Main` (phase_name_resolution.carbon:11)
  23. // CHECK:STDOUT: ==> marked `Main` declared but not usable in `package`
  24. // CHECK:STDOUT: ==> marked `Main` usable in `package`
  25. // CHECK:STDOUT: ->> resolving stmt `{ ... }` (phase_name_resolution.carbon:11)
  26. // CHECK:STDOUT: ->> resolving stmt `return ...;` (phase_name_resolution.carbon:10)
  27. // CHECK:STDOUT: <<- finished resolving stmt `return ...;` (phase_name_resolution.carbon:10)
  28. // CHECK:STDOUT: <<- finished resolving stmt `{ ... }` (phase_name_resolution.carbon:11)
  29. // CHECK:STDOUT: <<- finished resolving decl `fn Main` (phase_name_resolution.carbon:11)
  30. // CHECK:STDOUT: ==> resolved `Main` as `fn Main` in `package` (<Main()>:0)
  31. // CHECK:STDOUT: result: 0