Fix IDE0020
This commit is contained in:
committed by
Pavel Penev
parent
6d7c73d498
commit
67ba3e55de
@@ -147,6 +147,9 @@ dotnet_diagnostic.IDE0018.severity = warning
|
||||
# Use pattern matching to avoid 'as' followed by a 'null' check.
|
||||
dotnet_diagnostic.IDE0019.severity = warning
|
||||
|
||||
# Use pattern matching to avoid 'is' check followed by a cast.
|
||||
dotnet_diagnostic.IDE0020.severity = warning
|
||||
|
||||
# Collection initialization can be simplified
|
||||
dotnet_diagnostic.IDE0028.severity = warning
|
||||
|
||||
|
||||
@@ -176,9 +176,8 @@ namespace OpenRA.Scripting
|
||||
return new LuaCustomClrObject(obj);
|
||||
}
|
||||
|
||||
if (obj is Array)
|
||||
if (obj is Array array)
|
||||
{
|
||||
var array = (Array)obj;
|
||||
var i = 1;
|
||||
var table = context.CreateTable();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user