Ensure we fail gracefully when user tries to optimize Yul code

This commit is contained in:
Bhargava Shastry
2019-02-12 11:21:02 +01:00
parent 0b392fff7e
commit 7751fa740f
4 changed files with 6 additions and 7 deletions
+2 -4
View File
@@ -861,13 +861,11 @@ bool CommandLineInterface::processInput()
return false;
}
}
if (optimize && inputLanguage == Input::Assembly)
if (optimize && inputLanguage != Input::StrictAssembly)
{
serr() <<
"Optimizer cannot be used for loose assembly. Use --" <<
"Optimizer can only be used for strict assembly. Use --" <<
g_strStrictAssembly <<
" or --" <<
g_strYul <<
"." <<
endl;
return false;