Browse Source

Decompile 'volatile' modifier.

pull/288/head
Daniel Grunwald 14 years ago
parent
commit
59db5876ee
  1. 4
      ICSharpCode.Decompiler/Ast/AstBuilder.cs
  2. 1
      ICSharpCode.Decompiler/Tests/ValueTypes.cs

4
ICSharpCode.Decompiler/Ast/AstBuilder.cs

@ -641,6 +641,10 @@ namespace ICSharpCode.Decompiler.Ast @@ -641,6 +641,10 @@ namespace ICSharpCode.Decompiler.Ast
modifiers |= Modifiers.Readonly;
}
RequiredModifierType modreq = fieldDef.FieldType as RequiredModifierType;
if (modreq != null && modreq.ModifierType.FullName == typeof(IsVolatile).FullName)
modifiers |= Modifiers.Volatile;
return modifiers;
}

1
ICSharpCode.Decompiler/Tests/ValueTypes.cs

@ -52,6 +52,7 @@ public static class ValueTypes @@ -52,6 +52,7 @@ public static class ValueTypes
private static readonly ValueTypes.S ReadOnlyS = default(ValueTypes.S);
private static ValueTypes.S MutableS = default(ValueTypes.S);
private static volatile int VolatileInt;
public static void CallMethodViaField()
{

Loading…
Cancel
Save