C#: an interface's nested types are printed unqualified outside the interface (CS0246)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 68/100
Hướng nghiên cứu
Start in CSharpTypeName.name around lines 507–518 and compare its qualification logic with CSharpTypeName.inHeader, which the issue says emits the expected qualified names for the lambda adapter. Reproduce the reported Plain and Use cases or use the PromptTemplateFactory corpus example; done means generated C# qualifies nested interface types as IFactory.ITemplate and IFactory.IInput so the reported compiler errors are resolved.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Found while adding the variance tests (ws/maddi-csharp, after b13471627). A class that names a nested type of an interface prints the simple name, which C# does not resolve outside the interface:
interface Factory {
interface Input { }
interface Template { }
Template create(Input in);
}
class Plain implements Factory {
public Template create(Input in) { return null; } // Java: member types inherited from the interface
}
class Use {
static Factory make(Factory.Template t) { return in -> t; } // Java: explicitly qualified
}
prints
internal sealed class Plain : IFactory { public ITemplate Create(IInput @in) => null; } // CS0246 ×2, CS0535
internal sealed class Use { internal static IFactory Make(ITemplate t) => new FactoryLambda(@in => t); } // CS0246
Expected IFactory.ITemplate / IFactory.IInput, as the lambda adapter beside the interface now prints them (CSharpTypeName.inHeader). C# does not inherit member types from interfaces, so an implementing class needs the qualification as much as an unrelated one. Probably the Qualification treating the nested types as in scope by their simple name; CSharpTypeName.name lines ~507-518.
In the corpus: dev/langchain4j/spi/prompt/PromptTemplateFactory (IInput, ITemplate).
- Ngôn ngữ chính
- Java
- Star
- 1
- Fork
- 1
- Merge trung bình
- 1 giờ 13 phút
- Pull request đã merge (30 ngày)
- 6
Chuẩn bị môi trường
- 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 CodeLaser/maddi
-
Javadoc warnings are the only noise on an otherwise clean CI runCó thể đã có người làm @jayeshamundkar06-bit đã nhận 6 ngày trước. Đang mởbuild/ci good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
CodeLaser/maddi#4 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 61/100
CodeLaser/maddi#185 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 14/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của CodeLaser/maddi
Issue tương tự
-
Document and enforce pull request review guidelinesCó thể đã có người làm @dashorst đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
`Time.at(t, in: nil)` returns UTC instead of the local time (or the time zone of `t`), unlike CRubyĐang mở
Độ 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 1 ngày
-
hermes-queue
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
chrisalunlloyd2-sudo/mindpalace#349 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Retry-After parser accepts invalid delay-seconds valuesCó thể đã có người làm @Dhruvraj-Rana đã nhận hôm nay. Đang mởBug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
open-telemetry/opentelemetry-java#9018 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
dropwizard-testing: DAOTest.inTransaction leaves the transaction open when an Error is thrownĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
dropwizard/dropwizard#11410 ·
Maintainer thường phản hồi trong vòng 1 ngày