1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Fixed constraint checks for inner types

This commit is contained in:
Brian Fiete 2022-06-23 13:55:34 -07:00
parent 439b34f7c2
commit bca82c231f
3 changed files with 76 additions and 6 deletions

View file

@ -119,6 +119,38 @@ namespace IDETest
{
}
public class TestExt<T> where T : struct
{
public struct InnerA
{
}
public struct InnerB<T2> where T2 : struct
{
}
}
extension TestExt<T>
where T : Int
{
public int a = 0;
public struct InnerC
{
}
}
static void TestExtMethod()
{
TestExt<String>.InnerA a; //FAIL
TestExt<String>.InnerB<int> b; //FAIL
TestExt<int>.InnerB<int> c;
TestExt<int>.InnerC d;
TestExt<float>.InnerC e; //FAIL
}
}
}