@@ -102101,14 +102101,7 @@ public class Broken<T> : IEnumerable<IEquatable<T>> where T : class
...
@@ -102101,14 +102101,7 @@ public class Broken<T> : IEnumerable<IEquatable<T>> where T : class
}
}
";
";
var comp = CreateCompilation(source, options: WithNonNullTypesTrue());
var comp = CreateCompilation(source, options: WithNonNullTypesTrue());
comp.VerifyDiagnostics(
comp.VerifyDiagnostics();
// (8,40): warning CS8613: Nullability of reference types in return type of 'IEnumerator<IEquatable<T?>> Working<T>.GetEnumerator()' doesn't match implicitly implemented member 'IEnumerator<IEquatable<T>> IEnumerable<IEquatable<T>>.GetEnumerator()'.
// public IEnumerator<IEquatable<T?>> GetEnumerator() => throw null!;
// (15,60): warning CS8616: Nullability of reference types in return type doesn't match implemented member 'IEnumerator<IEquatable<T>> IEnumerable<IEquatable<T>>.GetEnumerator()'.
// (25,9): error CS0311: The type 'B' cannot be used as type parameter 'T' in the generic type or method 'C.M<T>(Span<T>)'. There is no implicit reference conversion from 'B' to 'System.IEquatable<B>'.
// (26,9): error CS0311: The type 'B' cannot be used as type parameter 'T' in the generic type or method 'C.M<T>(Span<T>)'. There is no implicit reference conversion from 'B' to 'System.IEquatable<B>'.