CommandLineInterface: Display an error instead of crashing when assembly variant has no Ewasm translation

This commit is contained in:
Kamil Śliwak 2020-05-29 21:21:42 +02:00
parent 0a71e41501
commit ef133aa670
6 changed files with 13 additions and 0 deletions

View File

@ -1172,6 +1172,12 @@ bool CommandLineInterface::processInput()
endl;
return false;
}
if (targetMachine == Machine::Ewasm && inputLanguage != Input::StrictAssembly && inputLanguage != Input::Ewasm)
{
serr() << "The selected input language is not directly supported when targeting the Ewasm machine ";
serr() << "and automatic translation is not available." << endl;
return false;
}
serr() <<
"Warning: Yul is still experimental. Please use the output with care." <<
endl;

View File

@ -0,0 +1 @@
--assemble --machine ewasm

View File

@ -0,0 +1 @@
The selected input language is not directly supported when targeting the Ewasm machine and automatic translation is not available.

View File

@ -0,0 +1 @@
1

View File

@ -0,0 +1,3 @@
{
sstore(0, 1)
}

View File

@ -0,0 +1 @@