To reproduce:
var code =
"""
using Rocks;
public abstract class ArgumentMapper
{
protected interface ISource { }
protected abstract void NotUsingSource<T>()
where T : struct, ISource;
}
public static class Test
{
public static void Go()
{
var rock = Rock.Create<ArgumentMapper>();
}
}
""";
This will lead to the following error:
error CS0122: 'ArgumentMapper.ISource' is inaccessible due to its protection level
The problem is that T is constrained to a type that the mock cannot see, so this member cannot be mocked. And since it's abstract, the type cannot be mocked.
This was found on ILGPU.Backends.EntryPoints.ArgumentMapper - specifically, MapViewInstance().
To reproduce:
This will lead to the following error:
The problem is that
Tis constrained to a type that the mock cannot see, so this member cannot be mocked. And since it'sabstract, the type cannot be mocked.This was found on
ILGPU.Backends.EntryPoints.ArgumentMapper- specifically,MapViewInstance().