Browse Source

#1252: Eliminate more types of redundant casts

pull/1317/head
Daniel Grunwald 7 years ago
parent
commit
6a417eab97
  1. 6
      ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs

6
ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs

@ -413,14 +413,8 @@ namespace ICSharpCode.Decompiler.CSharp @@ -413,14 +413,8 @@ namespace ICSharpCode.Decompiler.CSharp
return newTargetType.IsKnownType(KnownTypeCode.FormattableString)
|| newTargetType.IsKnownType(KnownTypeCode.IFormattable);
}
if (conversion.IsAnonymousFunctionConversion) {
return oldTargetType.Equals(newTargetType);
}
if (conversion.IsUserDefined || newTargetType.IsKnownType(KnownTypeCode.Decimal) || conversion.IsDynamicConversion) {
return oldTargetType.Equals(newTargetType);
}
return false;
}
TranslatedExpression LdcI4(ICompilation compilation, int val)
{

Loading…
Cancel
Save