mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 10:00:09 +01:00
Support for global variables is still missing; they're a bit more tricky because they use a pattern to introduce their name. Prior to this change, explorer heavily relied on name comparisons to determine whether two declarations declare the same entity. Some of those instances are fixed in this PR, but more remain to be fixed, and some TODOs are added for some harder-to-fix instances.
26 lines
662 B
Plaintext
26 lines
662 B
Plaintext
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
// Exceptions. See /LICENSE for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
// AUTOUPDATE
|
|
// RUN: %{explorer-run}
|
|
// RUN: %{explorer-run-trace}
|
|
// CHECK:STDOUT: result: 0
|
|
|
|
package ExplorerTest api;
|
|
|
|
// Check that even generic parameters are looked up in the namespace of an
|
|
// entity.
|
|
namespace N;
|
|
|
|
interface N.Interface {}
|
|
|
|
class N.A(T:! Interface) {}
|
|
interface N.B(T:! Interface) {}
|
|
constraint N.C(T:! Interface) {}
|
|
__mixin N.D(T:! Interface) {}
|
|
choice N.E(T:! Interface) {}
|
|
fn N.F[T:! Interface](a: A(T)) {}
|
|
|
|
fn Main() -> i32 { return 0; }
|