Browse Source

Partially revert CheckNoNamedOrOptionalArguments.

pull/1596/head
Siegfried Pammer 7 years ago
parent
commit
6338bd1b85
  1. 13
      ICSharpCode.Decompiler/CSharp/Transforms/ReplaceMethodCallsWithOperators.cs

13
ICSharpCode.Decompiler/CSharp/Transforms/ReplaceMethodCallsWithOperators.cs

@ -154,16 +154,9 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms
if (arguments.Length < 2) if (arguments.Length < 2)
return false; return false;
bool valid = false; return !arguments.Any(arg => arg is NamedArgumentExpression) &&
(arguments[0].GetResolveResult().Type.IsKnownType(KnownTypeCode.String) ||
foreach (var argument in arguments) { arguments[1].GetResolveResult().Type.IsKnownType(KnownTypeCode.String));
if (argument is NamedArgumentExpression)
return false;
if (argument.GetResolveResult().Type.IsKnownType(KnownTypeCode.String))
valid = true;
}
return valid;
} }
static BinaryOperatorType? GetBinaryOperatorTypeFromMetadataName(string name) static BinaryOperatorType? GetBinaryOperatorTypeFromMetadataName(string name)

Loading…
Cancel
Save