File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,11 @@ namespace DotNext.Runtime;
2121/// not for <see cref="BoxedValue{T}"/>.
2222/// </remarks>
2323/// <typeparam name="T">The value type.</typeparam>
24- public class BoxedValue < T > // do not add any interfaces or base types
24+ public abstract class BoxedValue < T > // do not add any interfaces or base types
2525 where T : struct
2626{
2727 internal T value ;
2828
29- [ ExcludeFromCodeCoverage ]
30- private BoxedValue ( ) => throw new NotImplementedException ( ) ;
31-
3229 /// <summary>
3330 /// Gets a reference to the boxed value.
3431 /// </summary>
@@ -110,6 +107,15 @@ namespace DotNext.Runtime;
110107 /// <returns>Mutable reference to the boxed value.</returns>
111108 public static implicit operator ValueReference < T > ( BoxedValue < T > boxedValue )
112109 => new ( boxedValue , ref boxedValue . value ) ;
110+
111+ /// <inheritdoc />
112+ public abstract override bool Equals ( [ NotNullWhen ( true ) ] object ? obj ) ; // abstract to avoid inlining by AOT/JIT
113+
114+ /// <inheritdoc />
115+ public abstract override int GetHashCode ( ) ; // abstract to avoid inlining by AOT/JIT
116+
117+ /// <inheritdoc />
118+ public abstract override string ToString ( ) ; // abstract to avoid inlining by AOT/JIT
113119}
114120
115121public static class BoxedValue
You can’t perform that action at this time.
0 commit comments