Internal type in the global namespace of a referenced assembly shadows other referenced public members
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 45/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Lĩnh vực
- compilers
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- F#
- Star
- 4.3k
- Fork
- 883
- Merge trung bình
- 3 ngày 13 giờ
- Pull request đã merge (30 ngày)
- 108
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của dotnet/fsharp
-
Needs-Triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Semantic classification cache for opened documents is never populated (written to the unopened-documents cache)Có thể đã có người làm @xperiandri đã nhận 59 ngày trước. Đang mởNeeds-Triage
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Needs-Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
dotnet/fsharp#20265 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Bug Needs-Triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 3 ngày
-
Needs-Triage
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của dotnet/fsharp
Issue tương tự
-
Won't Fix
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
microsoft/TypeScript#65107 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
`color-mix(var(--color-red-500))` crashes the build with `Cannot read properties of undefined (reading 'kind')`Có thể đã có người làm @zerotohero3 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 80/100
tailwindlabs/tailwindcss#20657 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
needs-triage type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug scope:diagnostics
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
Maintainer thường phản hồi trong vòng 1 ngày