Skip to content

Commit 487731d

Browse files
author
Vyacheslav
committed
feat: skip init for value type
1 parent fef1201 commit 487731d

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

Src/StackMemoryCollections/GenerateStack.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ private void StackTop(
675675
in string sizeOfStr
676676
)
677677
{
678-
if (typeInfo.IsUnmanagedType)
678+
if (typeInfo.IsValueType)
679679
{
680680
builder.Append($@"
681681
[SkipLocalsInit]

Src/Tests/StackOfTestStructFixture.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
using NUnit.Framework;
2-
using StackMemoryAttributes.Attributes;
3-
using StackMemoryCollections.Attibutes;
42
using System;
5-
using System.Collections.Generic;
63
using System.Runtime.CompilerServices;
74

85
namespace Tests

0 commit comments

Comments
 (0)