mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 09:00:10 +01:00
Fixes https://github.com/carbon-language/carbon-lang/blob/46503c0a9d20d8e38dde1ff4266f4e2b98699669/explorer/interpreter/resolve_names.cpp#L281 This was super fun to implement as first contribution. Learnt a lot about how the interpreter works while digging through the code and trying different ways to fix it.
29 lines
532 B
Plaintext
29 lines
532 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;
|
|
|
|
namespace N;
|
|
namespace N.M;
|
|
fn N.F() {}
|
|
fn N.M.FM() {}
|
|
|
|
alias A = N;
|
|
alias AM = N.M;
|
|
alias N.A = N.M;
|
|
alias N.A2 = N;
|
|
|
|
fn Main() -> i32 {
|
|
A.F();
|
|
AM.FM();
|
|
N.A.FM();
|
|
A.A2.A2.A2.A2.A2.A2.A2.F();
|
|
return 0;
|
|
}
|