Skip to content

Commit 8dc613c

Browse files
authored
Fix IncludeInStub (#21)
***NO_CI***
1 parent 6c50a89 commit 8dc613c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

source/MetadataProcessor.Core/Extensions/TypeDefinitionExtensions.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//
1+
//
22
// Copyright (c) 2019 The nanoFramework project contributors
33
// See LICENSE file in the project root for full license information.
44
//
@@ -13,16 +13,16 @@ public static bool IncludeInStub(this TypeDefinition value)
1313
{
1414
var typeDefFlags = nanoTypeDefinitionTable.GetFlags(value);
1515

16-
if (typeDefFlags.HasFlag(
17-
nanoTypeDefinitionFlags.TD_Delegate |
18-
nanoTypeDefinitionFlags.TD_MulticastDelegate))
16+
if ( typeDefFlags.HasFlag(nanoTypeDefinitionFlags.TD_Delegate) ||
17+
typeDefFlags.HasFlag(nanoTypeDefinitionFlags.TD_MulticastDelegate))
1918
{
2019
return false;
2120
}
2221

2322
// Only generate a stub for classes and value types.
24-
if (value.IsClass ||
25-
value.IsValueType)
23+
if ( (value.IsClass ||
24+
value.IsValueType) &&
25+
!value.IsEnum)
2626
{
2727
return true;
2828
}

0 commit comments

Comments
 (0)