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