mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
C#: Add test cases for static and virtual operators in interfaces and overlapping interface declarations.
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -140,6 +140,33 @@ namespace Test
|
||||
unsafe public void M1(delegate* unmanaged<System.IntPtr, void> f) => throw null;
|
||||
}
|
||||
|
||||
public interface IInterface2<T> where T : IInterface2<T>
|
||||
{
|
||||
static abstract T operator +(T left, T right);
|
||||
static virtual T operator -(T left, T right) => throw null;
|
||||
static abstract T operator *(T left, T right);
|
||||
static virtual T operator /(T left, T right) => throw null;
|
||||
void M1();
|
||||
void M2();
|
||||
}
|
||||
|
||||
public interface IInterface3<T> where T : IInterface3<T>
|
||||
{
|
||||
static abstract T operator +(T left, T right);
|
||||
static virtual T operator -(T left, T right) => throw null;
|
||||
void M1();
|
||||
}
|
||||
|
||||
public class Class11 : IInterface2<Class11>, IInterface3<Class11>
|
||||
{
|
||||
public static Class11 operator +(Class11 left, Class11 right) => throw null;
|
||||
public static Class11 operator -(Class11 left, Class11 right) => throw null;
|
||||
static Class11 IInterface2<Class11>.operator *(Class11 left, Class11 right) => throw null;
|
||||
static Class11 IInterface2<Class11>.operator /(Class11 left, Class11 right) => throw null;
|
||||
public void M1() => throw null;
|
||||
void IInterface2<Class11>.M2() => throw null;
|
||||
}
|
||||
|
||||
public enum Enum1
|
||||
{
|
||||
None1,
|
||||
|
||||
Reference in New Issue
Block a user