Internal type in the global namespace of a referenced assembly shadows other referenced public members
メンテナーはふだん 3 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 45/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 領域
- compilers
調査の方向性
Start by running the provided F# repro with and without the referenced assembly, then trace compiler name resolution for unqualified expression identifiers and inaccessible types from referenced assemblies. Done means the unqualified id resolves to Operators.id and the repro prints [1; 3] with the assembly referenced.
索引モデルが issue の本文から書いたものです。
説明
When a referenced assembly contains an internal top-level type named id in the global namespace, an unqualified id in my code no longer resolves to Operators.id. It resolves to the inaccessible type instead.
Repro:
#r "nuget: c1.win.input,10.0.20262.832" // just to pull the package
#r @"%USERPROFILE%\.nuget\packages\c1.win.input\10.0.20262.832\lib\net10.0-windows7.0\C1.Win.Input.10.dll" // change %USERPROFILE% to the actual path
let xs = [ Some 1; None; Some 3 ] |> Seq.choose id |> Seq.toList
printfn "%A" xs
Actual:
error FS0001: This expression was expected to have type 'int option' but here has type 'unit'
In a project build, the same code gives error FS0801: This type has no accessible object constructors.
Expected:
[1; 3]
Without the assembly being referenced, the script prints [1; 3].
An inaccessible type from another assembly shouldn’t take part in name resolution for an ordinary expression identifier.
Workaround:
Use qualified names.
- 主要言語
- F#
- スター
- 4.3k
- フォーク
- 883
- 平均マージ
- 3日 13時間
- マージ済み PR(30日)
- 108
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
dotnet/fsharp のほかの issue
-
Needs-Triage
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
メンテナーはふだん 3 日以内に返信
-
Semantic classification cache for opened documents is never populated (written to the unopened-documents cache)対応中かも @xperiandri が 59 日前に担当しました。 オープンNeeds-Triage
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
メンテナーはふだん 3 日以内に返信
-
Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
dotnet/fsharp#20265 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信
-
Bug Needs-Triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 3 日以内に返信
-
Needs-Triage
難易度 4/5 3〜5日 初心者へのやさしさ 28/100
メンテナーはふだん 3 日以内に返信
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
JakeChampion/lang#14091 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
mattwparas/steel#727 ·
メンテナーはふだん 1 日以内に返信