Skip to content

Commit

Permalink
Add more nullability test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio0694 committed Jan 6, 2025
1 parent fd9faea commit 9a56de0
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1318,6 +1318,7 @@ public partial class MyObject<T1, T2, T3, T4> : DependencyObject
[DataRow("T1?")]
[DataRow("T2?")]
[DataRow("T3?")]
[DataRow("T4")]
[DataRow("T4?")]
public async Task InvalidPropertyNullableAnnotationAnalyzer_TypeParameter_NullableType_DoesNotWarn(string declaredType)
{
Expand Down Expand Up @@ -1547,6 +1548,8 @@ public sealed partial class KeyFrameCollection<TValue, TKeyFrame> : DependencyOb
[DataRow("T1")]
[DataRow("T2")]
[DataRow("T3")]
[DataRow("T5")]
[DataRow("T6")]
public async Task InvalidPropertyNullableAnnotationAnalyzer_TypeParameter_NotNullableType_Warns(string declaredType)
{
string source = $$"""
Expand All @@ -1558,10 +1561,12 @@ public async Task InvalidPropertyNullableAnnotationAnalyzer_TypeParameter_NotNul
namespace MyApp;
public partial class MyObject<T1, T2, T3, T4> : DependencyObject
public partial class MyObject<T1, T2, T3, T4, T5, T6> : DependencyObject
where T1 : class
where T3 : T2, new()
where T4 : unmanaged
where T5 : DependencyObject
where T6 : T5
{
[GeneratedDependencyProperty]
public partial {{declaredType}} {|WCTDPG0009:{|CS9248:Value|}|} { get; set; }
Expand Down

0 comments on commit 9a56de0

Please sign in to comment.