1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Changed mixin circular reference detection

This commit is contained in:
Brian Fiete 2021-08-02 10:42:53 -07:00
parent e5f92fb21b
commit 954f6312b8
3 changed files with 92 additions and 31 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Collections;
namespace IDETest
{
@ -55,11 +56,39 @@ namespace IDETest
}
public static mixin MixinA()
{
MixinA!(); //FAIL
}
public static mixin MixinB<T>(T val) where T : var
{
}
public static mixin MixinB<T, T2>(T val) where T : List<T2>
{
MixinB!(val);
}
public static mixin MixinC<T>(T val) where T : var
{
}
public static mixin MixinC<T, T2>(T val) where T : List<T2>
{
if (!val.IsEmpty)
MixinC!(val.Front);
}
public static void Test()
{
ClassB cb = scope .();
MethodA(cb, 123); //FAIL
MethodB(cb, 234); //FAIL
List<List<int>> list = scope .();
MixinB!(list); //FAIL
MixinC!(list);
}
}
}