fix #431, Virtual call in ctor - problem with overloaded virtual methods (#432)

This commit is contained in:
Basile Burg 2017-05-12 15:25:58 +02:00 committed by GitHub
parent 67834d50df
commit 40b183aed9
2 changed files with 5 additions and 2 deletions

View File

@ -172,8 +172,8 @@ struct StaticAnalysisConfig
string properly_documented_public_functions = Check.disabled;
@INI("Check for useless usage of the final attribute")
string final_attribute_check = Check.disabled;
string final_attribute_check = Check.enabled;
@INI("Check for virtual calls in the class constructors")
string vcall_in_ctor = Check.disabled;
string vcall_in_ctor = Check.enabled;
}

View File

@ -135,7 +135,10 @@ private:
foreach (vm; _virtualMethods[$-1])
{
if (call == vm)
{
addErrorMessage(call.line, call.column, KEY, MSG);
break;
}
}
}