Diagnostic for use of plain protocol name in type position should suggest `some` or `any`
@yyoungbash đang làm issue này rồi.
Từ ngày 29/10/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
The following code is invalid:
protocol P {
associatedtype A
}
func generic(value: P) {}
The compiler currently produces the error message Use of protocol 'P' as a type must be written 'any P' with a fix-it to insert the any keyword.
However, a different (and often better!) fix here is to use the some keyword. The error message should be re-worded to prompt the programmer to consider any or some, and there should be two notes, each with a fix-it to insert any or some, respectively.
- Ngôn ngữ chính
- Swift
- Star
- 70.4k
- Fork
- 10.8k
- Merge trung bình
- 2 ngày 2 giờ
- Pull request đã merge (30 ngày)
- 461
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 swiftlang/swift
-
triage needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
triage needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
-
Foundation Windows
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
triage needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
-
triage needed
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Tất cả issue của swiftlang/swift
Issue tương tự
-
type: docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 95/100
googleapis/google-cloud-swift#971 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
Move wallpaper setting Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mozilla-mobile/firefox-ios#35743 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
manaflow-ai/cmux#13417 ·
-
triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
ionic-team/capacitor#8616 ·