Изменены проверки на null в свойствах method_call

This commit is contained in:
Alexander Zakharenko 2016-05-23 13:46:16 +03:00
parent 52e14522d1
commit 1b57cc83a5

View file

@ -768,7 +768,13 @@ namespace PascalABCCompiler.SyntaxTree
/// </summary>
public string SimpleName
{
get { return (dereferencing_value as ident)?.name; }
get
{
if (dereferencing_value is ident)
return (dereferencing_value as ident).name;
else
return null;
}
}
/// <summary>
@ -776,7 +782,13 @@ namespace PascalABCCompiler.SyntaxTree
/// </summary>
public int ParametersCount
{
get { return parameters?.subnodes_count ?? 0; }
get
{
if (parameters != null)
return parameters.subnodes_count;
else
return 0;
}
}
public override string ToString()