nac3artiq: throw error message when constructor use rpc decorator #306
|
@ -402,6 +402,7 @@ impl Nac3 {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
{
|
{
|
||||||
|
// This part check if __init__ method decorate with inappropriate decorator (rpc)
|
||||||
if name == &"__init__".into() {
|
if name == &"__init__".into() {
|
||||||
return Err(CompileError::new_err(format!(
|
return Err(CompileError::new_err(format!(
|
||||||
"compilation failed\n----------\nConstructor __init__ function should not decorated with rpc decorator (at {})",
|
"compilation failed\n----------\nConstructor __init__ function should not decorated with rpc decorator (at {})",
|
||||||
|
|
Loading…
Reference in New Issue