public class C {
public void M() {
var i = 0;
var name = "Foo" + i; // This is lowered to string name = string.Concat("Foo", i.ToString());
}
}
Two additional checks added to the analyzer:
Analysis of the SyntaxKind.AddExpression and the BinaryExpressionSyntax to look for concat. This is more for defense in depth to stop additional special cased analysis that was there previously.
Update to OperationKind.Conversion. When an IConversionOperation is analyzed, we need to consider a few things: there are safe operations where the compiler lowers the code to an optimal condition to avoid boxing, boxing depends on surrounding context, and last there are specific types that are special cased.
Fixes #45
Two additional checks added to the analyzer:
SyntaxKind.AddExpression
and theBinaryExpressionSyntax
to look for concat. This is more for defense in depth to stop additional special cased analysis that was there previously.OperationKind.Conversion
. When anIConversionOperation
is analyzed, we need to consider a few things: there are safe operations where the compiler lowers the code to an optimal condition to avoid boxing, boxing depends on surrounding context, and last there are specific types that are special cased.