-
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 mut-immutable-composite-types
- Loading branch information
Showing
7 changed files
with
59 additions
and
2 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
2 changes: 2 additions & 0 deletions
2
...src/e2e_vm_tests/test_programs/should_pass/impl_self_dependency_order_conflict/.gitignore
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,2 @@ | ||
out | ||
target |
13 changes: 13 additions & 0 deletions
13
.../src/e2e_vm_tests/test_programs/should_pass/impl_self_dependency_order_conflict/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-0C133FB33C94FAC1" | ||
|
||
[[package]] | ||
name = "impl_self_dependency_order_conflict" | ||
source = "member" | ||
dependencies = ["std"] | ||
|
||
[[package]] | ||
name = "std" | ||
source = "path+from-root-0C133FB33C94FAC1" | ||
dependencies = ["core"] |
8 changes: 8 additions & 0 deletions
8
.../src/e2e_vm_tests/test_programs/should_pass/impl_self_dependency_order_conflict/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,8 @@ | ||
[project] | ||
entry = "main.sw" | ||
authors = ["Fuel Labs <contact@fuel.sh>"] | ||
license = "Apache-2.0" | ||
name = "impl_self_dependency_order_conflict" | ||
|
||
[dependencies] | ||
std = { path = "../../../reduced_std_libs/sway-lib-std-assert" } |
5 changes: 5 additions & 0 deletions
5
...src/e2e_vm_tests/test_programs/should_pass/impl_self_dependency_order_conflict/src/foo.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; | ||
|
||
pub fn foo() -> u32 { | ||
1 | ||
} |
27 changes: 27 additions & 0 deletions
27
...rc/e2e_vm_tests/test_programs/should_pass/impl_self_dependency_order_conflict/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,27 @@ | ||
library; | ||
|
||
mod foo; | ||
use foo::*; | ||
|
||
struct S {} | ||
|
||
impl S { //dependency of this impl is overwritten by the next impl | ||
fn a() -> u32 { foo() } | ||
fn b() {} | ||
} | ||
|
||
impl S { //this will overwrite the dependency for the previous impl | ||
fn ab() {} | ||
} | ||
|
||
fn foo() -> u32 { | ||
2 | ||
} | ||
|
||
fn main() {} | ||
|
||
#[test] | ||
fn test() { | ||
assert_eq(2, S::a()); | ||
} | ||
|
2 changes: 2 additions & 0 deletions
2
.../src/e2e_vm_tests/test_programs/should_pass/impl_self_dependency_order_conflict/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,2 @@ | ||
category = "unit_tests_pass" | ||
|