1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 20:42:21 +02:00

Fixed issue with local methods in generic types

This commit is contained in:
Brian Fiete 2020-09-27 23:07:29 -07:00
parent 5403cdb748
commit ee4ae8f9ed
3 changed files with 35 additions and 9 deletions

View file

@ -6,6 +6,25 @@ namespace Tests
{
class LocalFunctions
{
class ClassA<T>
{
public int Get<T2>()
{
int LocalA()
{
return 123;
}
int LocalB<T3>(T3 val) where T3 : IHashable
{
val.GetHashCode();
return 234;
}
return LocalA() + LocalB(1.2f);
}
}
[Test]
static void TestA()
{
@ -23,6 +42,9 @@ namespace Tests
FuncA();
Test.Assert(a == 101);
ClassA<int> ca = scope .();
Test.Assert(ca.Get<int16>() == 357);
}
[Test]