add structure/invalid-using-directive-container diagnostic#1847
add structure/invalid-using-directive-container diagnostic#1847OmarTawfik wants to merge 1 commit into
structure/invalid-using-directive-container diagnostic#1847Conversation
|
|
| Branch | OmarTawfik/diagnose-using-directive-location |
| Testbed | ci |
⚠️ WARNING: Truncated view!The full continuous benchmarking report exceeds the maximum length allowed on this platform.
🐰 View full continuous benchmarking report in Bencher
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Using directives are not allowed inside interfaces since Solidity `0.7.1`.
23987f0 to
9c31a49
Compare
teofr
left a comment
There was a problem hiding this comment.
Thanks! LGTM
Just a sort of unrelated question
| self.leave_scope_for_node_id(node.id()); | ||
| } | ||
|
|
||
| fn enter_using_directive(&mut self, node: &ir::UsingDirective) -> bool { |
There was a problem hiding this comment.
We've sort of discussed about where to place validations in the codebase. Since this one is a free floating one (it could be anywhere), is there any reason to place it here?
| Parse errors: | ||
| Error: Using directives are only allowed at the file level, or inside contracts and libraries. | ||
| ╭─[input.sol:5:5] | ||
| │ | ||
| 5 │ using Utils for Bar; | ||
| │ ──────────┬───────── | ||
| │ ╰─────────── Error occurred here. | ||
| ───╯ | ||
|
|
||
| ------------------------------------------------------------------------ | ||
|
|
There was a problem hiding this comment.
Probably makes sense to remove this binding snapshot since it'd always fail in v2.
Using directives are not allowed inside interfaces since Solidity
0.7.1.