-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
P: criticalShould be looked at before anything elseShould be looked at before anything elsebugSomething isn't workingSomething isn't workingcompiler: frontendEverything to do with type checking, control flow analysis, and everything between parsing and IRgenEverything to do with type checking, control flow analysis, and everything between parsing and IRgenduplicateThis issue or pull request already existsThis issue or pull request already existsteam:compilerCompiler TeamCompiler Team
Description
Reproduce
contract;
storage {
var: u64,
}
abi MyContract {
fn test_function(s: storage) -> bool;
}
impl MyContract for Contract {
fn test_function(s: storage) -> bool {
let mut s = s;
s.var = s.var + 1;
true
}
}Error should state something similar to "storage" cannot be used as a type / Cannot pass in "storage" as a type into a function.
Screenshot
cc @FuelLabs/sway-compiler
Metadata
Metadata
Assignees
Labels
P: criticalShould be looked at before anything elseShould be looked at before anything elsebugSomething isn't workingSomething isn't workingcompiler: frontendEverything to do with type checking, control flow analysis, and everything between parsing and IRgenEverything to do with type checking, control flow analysis, and everything between parsing and IRgenduplicateThis issue or pull request already existsThis issue or pull request already existsteam:compilerCompiler TeamCompiler Team
Type
Projects
Status
Done
