You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling the code below, the compiler incorrectly reports duplicate values in the IndexerMethods enum, even though no duplicates are present.
using System;
using System.Collections;
namespace simple_test;
class Program
{
struct Yes;
struct No;
struct IsIndexable<T, TKey>
{
public typealias Result = comptype(_isIndexable(typeof(T), typeof(TKey)));
private enum IndexerMethods
{
Undefined = 0,
Get = 1,
Set = 2,
GetSet = Get | Set
}
[Comptime]
private static Type _isIndexable(Type type, Type keyType)
{
IndexerMethods m = .();
return typeof(No);
}
}
class ClassInstanceWrapper<T>
where IsIndexable<T, int>.Result : No
{
}
static void Main ()
{
let c1 = scope ClassInstanceWrapper<List<int>>();
Console.WriteLine(c1);
}
}
When compiling the code below, the compiler incorrectly reports duplicate values in the
IndexerMethods
enum, even though no duplicates are present.Tested with: 206023f
The text was updated successfully, but these errors were encountered: