Browse Source

Fix ResolveResult in VisitBitNot; update NRefactory for '0 - Enum' fix.

pull/728/head
Daniel Grunwald 9 years ago
parent
commit
d854af8db1
  1. 13
      ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs
  2. 2
      NRefactory

13
ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs

@ -277,10 +277,15 @@ namespace ICSharpCode.Decompiler.CSharp @@ -277,10 +277,15 @@ namespace ICSharpCode.Decompiler.CSharp
}
argument = argument.ConvertTo(compatibleType, this);
return new UnaryOperatorExpression(UnaryOperatorType.BitNot, argument)
.WithRR(new OperatorResolveResult(compatibleType, ExpressionType.Not, argument.ResolveResult))
.WithILInstruction(inst)
.ConvertTo(type, this);
var rr = resolver.ResolveUnaryOperator(UnaryOperatorType.BitNot, argument.ResolveResult);
var result = new UnaryOperatorExpression(UnaryOperatorType.BitNot, argument)
.WithRR(rr)
.WithILInstruction(inst);
if (type != null && (type.KnownTypeCode == KnownTypeCode.IntPtr || type.KnownTypeCode == KnownTypeCode.UIntPtr)) {
return result.ConvertTo(type, this);
} else {
return result;
}
}
ExpressionWithResolveResult LogicNot(TranslatedExpression expr)

2
NRefactory

@ -1 +1 @@ @@ -1 +1 @@
Subproject commit f89093760da14a6f1c42161d0428c990434d1ecd
Subproject commit 1463cf299d05a80d1056ad6608c375688629f006
Loading…
Cancel
Save