sway
sway copied to clipboard
Unrecognized annotations should be a compile error
Example:
contract;
abi MyContract {
fn test_function();
}
impl MyContract for Contract {
#[typo]
fn test_function() {
}
}
This builds fine. However, we should probably be checking annotations against a table of recognized annotations in certain places. (e.g. only allow storage annotations on functions/methods but not on structs etc.)
Fair enough, although it's probably just worth a warning rather than full on error.
Fair enough, although it's probably just worth a warning rather than full on error.
A warning is a good option I suppose!