Skip to content

Commit 76fac9e

Browse files
committed
Fixed nullability issue
1 parent 5938991 commit 76fac9e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/DotNext/Runtime/Intrinsics.cs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,7 @@ public static class Intrinsics
2727
/// <typeparam name="T">The type to check.</typeparam>
2828
/// <returns><see langword="true"/> if <typeparamref name="T"/> is nullable type; otherwise, <see langword="false"/>.</returns>
2929
[MethodImpl(MethodImplOptions.AggressiveInlining)]
30-
public static bool IsNullable<T>()
31-
{
32-
Unsafe.SkipInit(out T value);
33-
return value is null;
34-
}
30+
public static bool IsNullable<T>() => default(T) is null;
3531

3632
[MethodImpl(MethodImplOptions.AggressiveInlining)]
3733
internal static ref TTo InToRef<TFrom, TTo>(scoped ref readonly TFrom source)

0 commit comments

Comments
 (0)