generic_parameter_scope.carbon 609 B

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. package ExplorerTest api;
  7. // Check that even generic parameters are looked up in the namespace of an
  8. // entity.
  9. namespace N;
  10. interface N.Interface {}
  11. class N.A(T:! Interface) {}
  12. interface N.B(T:! Interface) {}
  13. constraint N.C(T:! Interface) {}
  14. __mixin N.D(T:! Interface) {}
  15. choice N.E(T:! Interface) {}
  16. fn N.F[T:! Interface](a: A(T)) {}
  17. fn Main() -> i32 { return 0; }
  18. // CHECK:STDOUT: result: 0