-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into josh/module_caching
- Loading branch information
Showing
88 changed files
with
588 additions
and
527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
...sts/test_programs/should_fail/abi_associated_const_access_with_impl_in_contract/Forc.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[[package]] | ||
name = "abi_associated_const_access_with_impl_in_contract" | ||
source = "member" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...s/test_programs/should_fail/abi_associated_const_access_with_impl_in_contract/src/main.sw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
contract; | ||
|
||
abi ConstantId { | ||
const ID: u32 = 0; | ||
} | ||
|
||
impl ConstantId for Contract { | ||
const ID: u32 = 1; | ||
} | ||
|
||
fn main() -> u32 { | ||
let _ = ConstantId::ID; | ||
|
||
// Leave enough space to avoid having both `let` lines in both error messages. | ||
|
||
let _ = Contract::ID; | ||
} |
7 changes: 7 additions & 0 deletions
7
...sts/test_programs/should_fail/abi_associated_const_access_with_impl_in_contract/test.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
category = "fail" | ||
|
||
#check: $()let _ = ConstantId::ID; | ||
#nextln: $()Could not find symbol "ID" in this scope. | ||
|
||
#check: $()let _ = Contract::ID; | ||
#nextln: $()Could not find symbol "ID" in this scope. |
11 changes: 2 additions & 9 deletions
11
.../src/e2e_vm_tests/test_programs/should_fail/abi_associated_const_missing_impl/src/main.sw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
script; | ||
contract; | ||
|
||
abi ConstantId { | ||
const ID: u32; | ||
} | ||
|
||
struct Struct {} | ||
|
||
impl ConstantId for Struct { | ||
} | ||
|
||
fn main() -> u32 { | ||
0 | ||
} | ||
impl ConstantId for Contract { } |
6 changes: 1 addition & 5 deletions
6
..._tests/test_programs/should_fail/abi_associated_const_missing_type_ascription/src/main.sw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
script; | ||
library; | ||
|
||
abi ConstantId { | ||
const ID; | ||
} | ||
|
||
fn main() -> u32 { | ||
0 | ||
} |
6 changes: 1 addition & 5 deletions
6
...2e_vm_tests/test_programs/should_fail/abi_associated_const_multiple_same_name/src/main.sw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,6 @@ | ||
script; | ||
library; | ||
|
||
abi ConstantId { | ||
const ID: u32; | ||
const ID: u32; | ||
} | ||
|
||
fn main() -> u32 { | ||
0 | ||
} |
1 change: 0 additions & 1 deletion
1
test/src/e2e_vm_tests/test_programs/should_fail/array_oob/json_abi_oracle.json
This file was deleted.
Oops, something went wrong.
15 changes: 5 additions & 10 deletions
15
test/src/e2e_vm_tests/test_programs/should_fail/array_oob_global_const_index/Forc.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,8 @@ | ||
[[package]] | ||
name = 'array_oob_global_const_index' | ||
source = 'member' | ||
dependencies = ['std'] | ||
name = "array_oob_global_const_index" | ||
source = "member" | ||
dependencies = ["core"] | ||
|
||
[[package]] | ||
name = 'core' | ||
source = 'path+from-root-FA9005293D2605B5' | ||
|
||
[[package]] | ||
name = 'std' | ||
source = 'path+from-root-FA9005293D2605B5' | ||
dependencies = ['core'] | ||
name = "core" | ||
source = "path+from-root-FA9005293D2605B5" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
.../e2e_vm_tests/test_programs/should_fail/array_oob_global_const_index/json_abi_oracle.json
This file was deleted.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
test/src/e2e_vm_tests/test_programs/should_fail/array_oob_global_const_index/src/main.sw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
script; | ||
|
||
const i: u64 = 4; | ||
const I: u64 = 4; | ||
|
||
fn main() -> u64 { | ||
// index out of bounds: the length is 3 but the index is 4 | ||
let ary = [1, 2, 3]; | ||
ary[i] | ||
ary[I] | ||
} |
16 changes: 0 additions & 16 deletions
16
test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/Forc.lock
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
test/src/e2e_vm_tests/test_programs/should_fail/const-instead-of-let/json_abi_oracle.json
This file was deleted.
Oops, something went wrong.
5 changes: 0 additions & 5 deletions
5
test/src/e2e_vm_tests/test_programs/should_fail/const_eval_bad_struct_with_return/Forc.lock
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,3 @@ | ||
[[package]] | ||
name = "const_eval_bad_struct_with_return" | ||
source = "member" | ||
dependencies = ["core"] | ||
|
||
[[package]] | ||
name = "core" | ||
source = "path+from-root-154BF654D5BA1912" |
Oops, something went wrong.