mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixes for type dependencies and tests for type deletion bug
This commit is contained in:
parent
198acef1c6
commit
03fbc9d468
16 changed files with 309 additions and 55 deletions
49
IDE/Tests/BugW004/src/Program.bf
Normal file
49
IDE/Tests/BugW004/src/Program.bf
Normal file
|
@ -0,0 +1,49 @@
|
|||
#pragma warning disable 168
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
|
||||
namespace Bug
|
||||
{
|
||||
class Program
|
||||
{
|
||||
class Dicto : Dictionary<int, float>
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static bool Method1<T>(IEnumerator<T> param1)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool Method2<TEnumerator, TElement>(TEnumerator param1) where TEnumerator : IEnumerator<TElement>
|
||||
{
|
||||
for (let val in param1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool Method3<K, V>(Dictionary<K, V> param1) where K : IHashable
|
||||
{
|
||||
Method1(param1.GetEnumerator());
|
||||
Method1((IEnumerator<(K key, V value)>)param1.GetEnumerator());
|
||||
//*Method3_BadCall
|
||||
return Method3<Dictionary<K, V>.Enumerator, (K key, V value)>(param1.GetEnumerator());
|
||||
/*@*/
|
||||
|
||||
/*Method3_GoodCall
|
||||
return Method2<Dictionary<K, V>.Enumerator, (K key, V value)>(param1.GetEnumerator());
|
||||
*/
|
||||
}
|
||||
|
||||
static void Main()
|
||||
{
|
||||
Dicto dicto = scope .();
|
||||
Method3(dicto);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue