Skip to content

Commit

Permalink
L-09 Don't allow constant keyword in interfaces
Browse files Browse the repository at this point in the history
This keyword has been unsupported in solidity since 0.5.0.
  • Loading branch information
rory-ocl committed Aug 21, 2024
1 parent e08d717 commit 4167123
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion stylus-proc/src/calls/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,15 @@ pub fn sol_interface(input: TokenStream) -> TokenStream {
error!(attr.span(), "more than one purity attribute specified");
}
purity = Some(match mutability {
Mutability::Constant(_) | Mutability::Pure(_) => Pure,
Mutability::Pure(_) => Pure,
Mutability::View(_) => View,
Mutability::Payable(_) => Payable,
Mutability::Constant(_) => {
error!(
mutability.span(),
"constant mutability no longer supported"
);
}
});
}
FunctionAttribute::Visibility(vis) => {
Expand Down

0 comments on commit 4167123

Please sign in to comment.