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:
parent
439b34f7c2
commit
bca82c231f
3 changed files with 76 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue