Browse Source

Add extern modifier to non-abstract/non-interface method declarations without body

pull/728/head
Siegfried Pammer 9 years ago
parent
commit
540c3c22c5
  1. 2
      ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs

2
ICSharpCode.Decompiler/CSharp/CSharpDecompiler.cs

@ -530,6 +530,8 @@ namespace ICSharpCode.Decompiler.CSharp @@ -530,6 +530,8 @@ namespace ICSharpCode.Decompiler.CSharp
var methodDecl = typeSystemAstBuilder.ConvertEntity(method);
if (methodDefinition.HasBody) {
DecompileBody(methodDefinition, method, methodDecl, decompilationContext, typeSystemAstBuilder);
} else if (!method.IsAbstract && method.DeclaringType.Kind != TypeKind.Interface) {
methodDecl.Modifiers |= Modifiers.Extern;
}
if (decompilationContext.CurrentTypeDefinition.Kind != TypeKind.Interface
&& method.SymbolKind == SymbolKind.Method

Loading…
Cancel
Save