mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 20:42:21 +02:00
Added ability to lookup types with 'using static'
This commit is contained in:
parent
4ac56a2432
commit
a02de171ef
5 changed files with 204 additions and 48 deletions
45
IDEHelper/Tests/src/UsingStatic.bf
Normal file
45
IDEHelper/Tests/src/UsingStatic.bf
Normal file
|
@ -0,0 +1,45 @@
|
|||
#pragma warning disable 168
|
||||
|
||||
using static Tests.USOuter;
|
||||
using static Tests.USOuter.USInnerC<int>;
|
||||
|
||||
namespace Tests
|
||||
{
|
||||
class USOuter
|
||||
{
|
||||
public static int sVal0 = 123;
|
||||
|
||||
public class USInnerA
|
||||
{
|
||||
public class USInnerB<T>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class USInnerC<T>
|
||||
{
|
||||
public class USInnerD
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class USInnerE<T2>
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class UsingStatic
|
||||
{
|
||||
public static void TestBasics()
|
||||
{
|
||||
USInnerA innerA;
|
||||
USInnerA.USInnerB<int> innerB;
|
||||
int val = sVal0;
|
||||
USInnerD id;
|
||||
USInnerE<float> ie;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue