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

Better handling of extern generic constraints

This commit is contained in:
Brian Fiete 2025-01-15 11:25:51 -08:00
parent 4fa46b6a92
commit 1e44392da8
4 changed files with 75 additions and 5 deletions

View file

@ -1,3 +1,5 @@
#pragma warning disable 168
using System;
using System.Collections;
@ -21,6 +23,32 @@ namespace Tests
}
}
interface IZop
{
void Zop();
}
interface IZag
{
void Zag();
}
class ClassC<T> where T : IDisposable
{
public void MethodA(T val) where T : IZop, delete, new
{
val.Zop();
MethodB(val);
delete val;
}
public void MethodB(T val) where T : IZop, delete, new
{
alloctype(T) z = new T();
delete val;
}
}
struct TestFunc<T, Del>
{
private int mId;