Unexpected module resolution
まだ誰も着手していません。
評価
調査の方向性
まず、ArkScript 4.7.2 で両方の import 例を実行し、import の順序によって修飾されていない名前がどのように解決されるかを追跡します。max の解決を、明示的に import された list:max および修飾された math:max と比較します。両方の例で、import の順序に関係なく max が list:max に解決されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
What happened?
(import std.Prelude)
(import std.List:*)
(print (max [1 2]))
(import std.Prelude)
(import std.List :max)
(print (max [1 2]))
In both these examples, I would expect max to be list:max, but instead it's math:max. I find that confusing, because math:max is not defined nor imported without the prefix in either module.
Both examples work as I'd expect (max resolving to math:max--EDIT: list:max, sorry!) if the order of imports is reversed.
What ArkScript version are you seeing the problem on?
4.7.2
Operating System
Linux
Compiler used
None
Compiler version used
No response
Relevant code & log output
ArityError: When calling `(math:max [1 2])', received 1 argument, but expected 2: `(math:max _a _b)'
At IP: 597, PP: 0, SP: 3
exit status 1
Documentation
- I have read existing related documentation before submitting this report
- I have searched for an existing issue before posting
- 主要言語
- C++
- スター
- 729
- フォーク
- 54
- 平均マージ
- 4時間 8分
- マージ済み PR(30日)
- 2
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ArkScript-lang/Ark のほかの issue
-
🤔 help wanted ark/repl documentation enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
ArkScript-lang/Ark#711 ·
-
❗️ priority/low 👷 ci 🤔 help wanted github_actions
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
ArkScript-lang/Ark#708 ·
-
Link Checker Report オープンautomated issue report
難易度 2/5 1〜3時間 初心者へのやさしさ 55/100
ArkScript-lang/Ark#700 ·
-
enhancement
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
ArkScript-lang/Ark#631 ·
-
❗️ priority/low 👷 ci 🧪 tests
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
ArkScript-lang/Ark#506 ·
ArkScript-lang/Ark の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
AXERA-TECH/ax-llm#77 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
games-on-whales/wolf#509 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
bug-unconfirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NVIDIA/cuda-samples#453 ·