-
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.
- Loading branch information
Showing
14 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
test/src/e2e_vm_tests/test_programs/should_fail/multiple_enums_with_the_same_name/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,8 @@ | ||
[[package]] | ||
name = 'core' | ||
source = 'path+from-root-7683E8E5A9EFF30D' | ||
|
||
[[package]] | ||
name = 'multiple_enums_with_the_same_name' | ||
source = 'member' | ||
dependencies = ['core'] |
9 changes: 9 additions & 0 deletions
9
test/src/e2e_vm_tests/test_programs/should_fail/multiple_enums_with_the_same_name/Forc.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,9 @@ | ||
[project] | ||
authors = ["Fuel Labs <contact@fuel.sh>"] | ||
license = "Apache-2.0" | ||
name = "multiple_enums_with_the_same_name" | ||
entry = "main.sw" | ||
implicit-std = false | ||
|
||
[dependencies] | ||
core = { path = "../../../../../../sway-lib-core" } |
16 changes: 16 additions & 0 deletions
16
...vm_tests/test_programs/should_fail/multiple_enums_with_the_same_name/json_abi_oracle.json
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,16 @@ | ||
[ | ||
{ | ||
"attributes": null, | ||
"inputs": [], | ||
"name": "main", | ||
"outputs": [ | ||
{ | ||
"components": null, | ||
"name": "", | ||
"type": "u32", | ||
"typeArguments": null | ||
} | ||
], | ||
"type": "function" | ||
} | ||
] |
10 changes: 10 additions & 0 deletions
10
.../src/e2e_vm_tests/test_programs/should_fail/multiple_enums_with_the_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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
script; | ||
|
||
dep module0; | ||
dep module1; | ||
|
||
fn main() { | ||
let mut x = module0::MyEnum::A; | ||
let y = module1::MyEnum::A; | ||
x = y; | ||
} |
5 changes: 5 additions & 0 deletions
5
...c/e2e_vm_tests/test_programs/should_fail/multiple_enums_with_the_same_name/src/module0.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,5 @@ | ||
library module0; | ||
|
||
pub enum MyEnum { | ||
A: () | ||
} |
5 changes: 5 additions & 0 deletions
5
...c/e2e_vm_tests/test_programs/should_fail/multiple_enums_with_the_same_name/src/module1.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,5 @@ | ||
library module1; | ||
|
||
pub enum MyEnum { | ||
A: () | ||
} |
4 changes: 4 additions & 0 deletions
4
test/src/e2e_vm_tests/test_programs/should_fail/multiple_enums_with_the_same_name/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,4 @@ | ||
category = "fail" | ||
|
||
# check: $()x = y; | ||
# nextln: $()Mismatched types. |
8 changes: 8 additions & 0 deletions
8
.../src/e2e_vm_tests/test_programs/should_fail/multiple_structs_with_the_same_name/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,8 @@ | ||
[[package]] | ||
name = 'core' | ||
source = 'path+from-root-1918441B04275B9A' | ||
|
||
[[package]] | ||
name = 'multiple_structs_with_the_same_name' | ||
source = 'member' | ||
dependencies = ['core'] |
9 changes: 9 additions & 0 deletions
9
.../src/e2e_vm_tests/test_programs/should_fail/multiple_structs_with_the_same_name/Forc.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,9 @@ | ||
[project] | ||
authors = ["Fuel Labs <contact@fuel.sh>"] | ||
license = "Apache-2.0" | ||
name = "multiple_structs_with_the_same_name" | ||
entry = "main.sw" | ||
implicit-std = false | ||
|
||
[dependencies] | ||
core = { path = "../../../../../../sway-lib-core" } |
16 changes: 16 additions & 0 deletions
16
..._tests/test_programs/should_fail/multiple_structs_with_the_same_name/json_abi_oracle.json
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,16 @@ | ||
[ | ||
{ | ||
"attributes": null, | ||
"inputs": [], | ||
"name": "main", | ||
"outputs": [ | ||
{ | ||
"components": null, | ||
"name": "", | ||
"type": "u32", | ||
"typeArguments": null | ||
} | ||
], | ||
"type": "function" | ||
} | ||
] |
10 changes: 10 additions & 0 deletions
10
...rc/e2e_vm_tests/test_programs/should_fail/multiple_structs_with_the_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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
script; | ||
|
||
dep module0; | ||
dep module1; | ||
|
||
fn main() { | ||
let mut x = module0::Thing::new(); | ||
let y = module1::Thing::new(); | ||
x = y; | ||
} |
9 changes: 9 additions & 0 deletions
9
...e2e_vm_tests/test_programs/should_fail/multiple_structs_with_the_same_name/src/module0.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,9 @@ | ||
library module0; | ||
|
||
pub struct Thing {} | ||
|
||
impl Thing { | ||
pub fn new() -> Self { | ||
Thing {} | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
...e2e_vm_tests/test_programs/should_fail/multiple_structs_with_the_same_name/src/module1.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,9 @@ | ||
library module1; | ||
|
||
pub struct Thing {} | ||
|
||
impl Thing { | ||
pub fn new() -> Self { | ||
Thing {} | ||
} | ||
} |
4 changes: 4 additions & 0 deletions
4
.../src/e2e_vm_tests/test_programs/should_fail/multiple_structs_with_the_same_name/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,4 @@ | ||
category = "fail" | ||
|
||
# check: $()x = y; | ||
# nextln: $()Mismatched types. |