-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
19 changed files
with
593 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
...sts/test_programs/should_pass/language/reexport/shadowing_in_reexporting_module/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,13 @@ | ||
[[package]] | ||
name = "core" | ||
source = "path+from-root-EE202EE2D1735C08" | ||
|
||
[[package]] | ||
name = "shadowing_in_reexporting_module" | ||
source = "member" | ||
dependencies = ["std"] | ||
|
||
[[package]] | ||
name = "std" | ||
source = "path+from-root-EE202EE2D1735C08" | ||
dependencies = ["core"] |
9 changes: 9 additions & 0 deletions
9
...sts/test_programs/should_pass/language/reexport/shadowing_in_reexporting_module/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 = "shadowing_in_reexporting_module" | ||
entry = "main.sw" | ||
implicit-std = false | ||
|
||
[dependencies] | ||
std = { path = "../../../../../../../../sway-lib-std" } |
25 changes: 25 additions & 0 deletions
25
...ograms/should_pass/language/reexport/shadowing_in_reexporting_module/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,25 @@ | ||
{ | ||
"configurables": [], | ||
"functions": [ | ||
{ | ||
"attributes": null, | ||
"inputs": [], | ||
"name": "main", | ||
"output": { | ||
"name": "", | ||
"type": 0, | ||
"typeArguments": null | ||
} | ||
} | ||
], | ||
"loggedTypes": [], | ||
"messagesTypes": [], | ||
"types": [ | ||
{ | ||
"components": null, | ||
"type": "u64", | ||
"typeId": 0, | ||
"typeParameters": null | ||
} | ||
] | ||
} |
26 changes: 26 additions & 0 deletions
26
..._pass/language/reexport/shadowing_in_reexporting_module/json_abi_oracle_new_encoding.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,26 @@ | ||
{ | ||
"configurables": [], | ||
"encoding": "1", | ||
"functions": [ | ||
{ | ||
"attributes": null, | ||
"inputs": [], | ||
"name": "main", | ||
"output": { | ||
"name": "", | ||
"type": 0, | ||
"typeArguments": null | ||
} | ||
} | ||
], | ||
"loggedTypes": [], | ||
"messagesTypes": [], | ||
"types": [ | ||
{ | ||
"components": null, | ||
"type": "u64", | ||
"typeId": 0, | ||
"typeParameters": null | ||
} | ||
] | ||
} |
20 changes: 20 additions & 0 deletions
20
...est_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/items_1.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,20 @@ | ||
library; | ||
|
||
pub struct Items1_Struct { | ||
pub a: bool, | ||
} | ||
|
||
pub enum Items1_Enum { | ||
A: bool, | ||
B: bool, | ||
} | ||
|
||
pub const ITEMS_1_FUNCTION_RES = 456; | ||
|
||
pub fn items_1_function() -> bool { | ||
ITEMS_1_FUNCTION_RES == 456 | ||
} | ||
|
||
pub trait Items1Trait<T> { | ||
fn items_1_trait_function(self, x: T) -> bool; | ||
} |
20 changes: 20 additions & 0 deletions
20
...t_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/items_2_1.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,20 @@ | ||
library; | ||
|
||
pub struct Items2_Struct { | ||
pub b: bool, | ||
} | ||
|
||
pub enum Items2_Enum { | ||
C: bool, | ||
D: bool, | ||
} | ||
|
||
pub const ITEMS_2_FUNCTION_RES = 789; | ||
|
||
pub fn items_2_function() -> bool { | ||
ITEMS_2_FUNCTION_RES == 789 | ||
} | ||
|
||
pub trait Items2Trait<T> { | ||
fn items_2_trait_function(self, x: T) -> bool; | ||
} |
20 changes: 20 additions & 0 deletions
20
...t_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/items_2_2.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,20 @@ | ||
library; | ||
|
||
pub struct Items2_Struct { | ||
pub b: u64, | ||
} | ||
|
||
pub enum Items2_Enum { | ||
C: u64, | ||
D: u64, | ||
} | ||
|
||
pub const ITEMS_2_FUNCTION_RES = 987; | ||
|
||
pub fn items_2_function() -> u64 { | ||
ITEMS_2_FUNCTION_RES | ||
} | ||
|
||
pub trait Items2Trait<T> { | ||
fn items_2_trait_function(self, x: T) -> u64; | ||
} |
25 changes: 25 additions & 0 deletions
25
...t_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/items_3_1.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,25 @@ | ||
library; | ||
|
||
pub struct Items3_Struct { | ||
pub c: bool, | ||
} | ||
|
||
pub enum Items3_Enum { | ||
E: bool, | ||
F: bool, | ||
} | ||
|
||
pub enum Items3_Variants { | ||
G: bool, | ||
H: bool, | ||
} | ||
|
||
pub const ITEMS_3_FUNCTION_RES = 1234; | ||
|
||
pub fn items_3_function() -> bool { | ||
ITEMS_3_FUNCTION_RES == 1234 | ||
} | ||
|
||
pub trait Items3Trait<T> { | ||
fn items_3_trait_function(self, x: T) -> bool; | ||
} |
25 changes: 25 additions & 0 deletions
25
...t_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/items_4_1.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,25 @@ | ||
library; | ||
|
||
pub struct Items4_Struct { | ||
pub d: bool, | ||
} | ||
|
||
pub enum Items4_Enum { | ||
I: bool, | ||
J: bool, | ||
} | ||
|
||
pub enum Items4_Variants { | ||
K: bool, | ||
L: bool, | ||
} | ||
|
||
pub const ITEMS_4_FUNCTION_RES = 5678; | ||
|
||
pub fn items_4_function() -> bool { | ||
ITEMS_4_FUNCTION_RES == 5678 | ||
} | ||
|
||
pub trait Items4Trait<T> { | ||
fn items_4_trait_function(self, x: T) -> bool; | ||
} |
25 changes: 25 additions & 0 deletions
25
...t_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/items_4_2.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,25 @@ | ||
library; | ||
|
||
pub struct Items4_Struct { | ||
pub d: u64, | ||
} | ||
|
||
pub enum Items4_Enum { | ||
I: u64, | ||
J: u64, | ||
} | ||
|
||
pub enum Items4_Variants { | ||
K: u64, | ||
L: u64, | ||
} | ||
|
||
pub const ITEMS_4_FUNCTION_RES = 8765; | ||
|
||
pub fn items_4_function() -> u64 { | ||
ITEMS_4_FUNCTION_RES | ||
} | ||
|
||
pub trait Items4Trait<T> { | ||
fn items_4_trait_function(self, x: T) -> u64; | ||
} |
6 changes: 6 additions & 0 deletions
6
...t_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/items_4_3.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,6 @@ | ||
library; | ||
|
||
pub enum Items4_Variants2 { | ||
M: bool, | ||
N: bool, | ||
} |
6 changes: 6 additions & 0 deletions
6
...t_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/items_4_4.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,6 @@ | ||
library; | ||
|
||
pub enum Items4_Variants2 { | ||
M: u64, | ||
N: u64, | ||
} |
22 changes: 22 additions & 0 deletions
22
.../test_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/lib_1.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,22 @@ | ||
library; | ||
|
||
pub use ::items_1::*; | ||
|
||
pub struct Items1_Struct { | ||
pub a: u64, | ||
} | ||
|
||
pub enum Items1_Enum { | ||
A: u64, | ||
B: u64, | ||
} | ||
|
||
pub const ITEMS_1_FUNCTION_RES = 654; | ||
|
||
pub fn items_1_function() -> u64 { | ||
ITEMS_1_FUNCTION_RES | ||
} | ||
|
||
pub trait Items1Trait<T> { | ||
fn items_1_trait_function(self, x: T) -> u64; | ||
} |
9 changes: 9 additions & 0 deletions
9
.../test_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/lib_2.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; | ||
|
||
pub use ::items_2_1::*; | ||
|
||
pub use ::items_2_2::Items2_Struct; | ||
pub use ::items_2_2::Items2_Enum; | ||
pub use ::items_2_2::ITEMS_2_FUNCTION_RES; | ||
pub use ::items_2_2::items_2_function; | ||
pub use ::items_2_2::Items2Trait; |
28 changes: 28 additions & 0 deletions
28
.../test_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/lib_3.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,28 @@ | ||
library; | ||
|
||
pub use ::items_3_1::*; | ||
pub use ::items_3_1::Items3_Variants::*; | ||
|
||
pub struct Items3_Struct { | ||
pub c: u64, | ||
} | ||
|
||
pub enum Items3_Enum { | ||
E: u64, | ||
F: u64, | ||
} | ||
|
||
pub enum Items3_Variants { | ||
G: u64, | ||
H: u64, | ||
} | ||
|
||
pub const ITEMS_3_FUNCTION_RES = 4321; | ||
|
||
pub fn items_3_function() -> u64 { | ||
ITEMS_3_FUNCTION_RES | ||
} | ||
|
||
pub trait Items3Trait<T> { | ||
fn items_3_trait_function(self, x: T) -> u64; | ||
} |
17 changes: 17 additions & 0 deletions
17
.../test_programs/should_pass/language/reexport/shadowing_in_reexporting_module/src/lib_4.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 @@ | ||
library; | ||
|
||
pub use ::items_4_1::*; | ||
pub use ::items_4_1::Items4_Variants::*; | ||
|
||
pub use ::items_4_2::Items4_Struct; | ||
pub use ::items_4_2::Items4_Enum; | ||
pub use ::items_4_2::Items4_Variants; | ||
pub use ::items_4_2::Items4_Variants::K; | ||
pub use ::items_4_2::Items4_Variants::L; | ||
pub use ::items_4_2::ITEMS_4_FUNCTION_RES; | ||
pub use ::items_4_2::items_4_function; | ||
pub use ::items_4_2::Items4Trait; | ||
|
||
pub use ::items_4_3::Items4_Variants2::*; | ||
pub use ::items_4_4::Items4_Variants2::M; | ||
pub use ::items_4_4::Items4_Variants2::N; |
20 changes: 20 additions & 0 deletions
20
...s/test_programs/should_pass/language/reexport/shadowing_in_reexporting_module/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,20 @@ | ||
script; | ||
|
||
mod items_1; | ||
mod lib_1; // Item reexports of items_1 | ||
mod items_2_1; | ||
mod items_2_2; | ||
mod lib_2; // Item reexports of items_2_1 and items_2_2 | ||
mod items_3_1; | ||
mod lib_3; // Item reexports of items_3_1 and items_3_2 | ||
mod items_4_1; | ||
mod items_4_2; | ||
mod items_4_3; | ||
mod items_4_4; | ||
mod lib_4; // Item reexports of items_4_1 and items_4_2 | ||
|
||
mod tests; // All tests | ||
|
||
fn main() -> u64 { | ||
tests::run_all_tests() | ||
} |
Oops, something went wrong.