Ensure we fail gracefully when user tries to optimize Yul code

This commit is contained in:
Bhargava Shastry committed 2019-02-12 11:21:02 +01:00
1 parent 0b392fff7e
commit 7751fa740f
4 files changed
+6 -7

No files matched your search

+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;