forked from M-Labs/nac3
nac3standalone: report when entry point run function cannot be found
This commit is contained in:
parent
d336200bf4
commit
aae9925014
@ -100,7 +100,11 @@ fn main() {
|
|||||||
|
|
||||||
let instance = {
|
let instance = {
|
||||||
let defs = top_level.definitions.read();
|
let defs = top_level.definitions.read();
|
||||||
let mut instance = defs[resolver.get_identifier_def("run".into()).unwrap().0].write();
|
let mut instance =
|
||||||
|
defs[resolver
|
||||||
|
.get_identifier_def("run".into())
|
||||||
|
.unwrap_or_else(|| panic!("cannot find `run() -> int32 entry point`")).0
|
||||||
|
].write();
|
||||||
if let TopLevelDef::Function {
|
if let TopLevelDef::Function {
|
||||||
instance_to_stmt,
|
instance_to_stmt,
|
||||||
instance_to_symbol,
|
instance_to_symbol,
|
||||||
|
Loading…
Reference in New Issue
Block a user