Skip to content

Commit 8ea2168

Browse files
Add targeted regression test for #115442 (#115817)
Resolves #115442.
1 parent febe8b1 commit 8ea2168

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/tests/nativeaot/SmokeTests/UnitTests/Generics.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ internal static int Run()
6060
Test104913Regression.Run();
6161
Test105397Regression.Run();
6262
Test105880Regression.Run();
63+
Test115442Regression.Run();
6364
TestInvokeMemberCornerCaseInGenerics.Run();
6465
TestRefAny.Run();
6566
TestNullableCasting.Run();
@@ -3685,6 +3686,19 @@ public static void Run()
36853686
}
36863687
}
36873688

3689+
class Test115442Regression
3690+
{
3691+
public readonly struct TypeBuilder<T1, T2>
3692+
{
3693+
public TypeBuilder<(T1, T2), T3> Add<T3>() => default;
3694+
}
3695+
3696+
public static void Run()
3697+
{
3698+
typeof(TypeBuilder<int, int>).GetMethod("Add").MakeGenericMethod(typeof(int)).Invoke(default(TypeBuilder<int, int>), []);
3699+
}
3700+
}
3701+
36883702
class TestInvokeMemberCornerCaseInGenerics
36893703
{
36903704
class Generic<T>

0 commit comments

Comments
 (0)