-
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.
Search all namespaces for implemented traits, not just the local one (#…
…532) * Search all namespaces for implemented traits, not just the local one * add json abi oracle * fix oracle...
- Loading branch information
Showing
15 changed files
with
82 additions
and
35 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,6 +1,6 @@ | ||
[package] | ||
name = "docstrings" | ||
version = "0.1.6" | ||
version = "0.1.7" | ||
edition = "2021" | ||
publish = false | ||
|
||
|
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,6 +1,6 @@ | ||
[package] | ||
name = "forc" | ||
version = "0.1.6" | ||
version = "0.1.7" | ||
authors = ["Fuel Labs <[email protected]>"] | ||
edition = "2018" | ||
homepage = "https://fuel.network/" | ||
|
@@ -28,11 +28,11 @@ serde = {version = "1.0", features = ["derive"]} | |
serde_json = "1.0.73" | ||
source-span = "2.4" | ||
structopt = "0.3" | ||
sway-core = { version = "0.1.6", path = "../sway-core" } | ||
sway-fmt = { version = "0.1.6", path = "../sway-fmt" } | ||
sway-server = { version = "0.1.6", path = "../sway-server" } | ||
sway-utils = { version = "0.1.6", path = "../sway-utils" } | ||
sway-types = { version = "0.1.6", path = "../sway-types" } | ||
sway-core = { version = "0.1.7", path = "../sway-core" } | ||
sway-fmt = { version = "0.1.7", path = "../sway-fmt" } | ||
sway-server = { version = "0.1.7", path = "../sway-server" } | ||
sway-utils = { version = "0.1.7", path = "../sway-utils" } | ||
sway-types = { version = "0.1.7", path = "../sway-types" } | ||
tar = "0.4.35" | ||
term-table = "1.3" | ||
termcolor = "1.1" | ||
|
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,6 +1,6 @@ | ||
[package] | ||
name = "parser" | ||
version = "0.1.6" | ||
version = "0.1.7" | ||
edition = "2021" | ||
publish = false | ||
|
||
|
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,6 +1,6 @@ | ||
[package] | ||
name = "sway-core" | ||
version = "0.1.6" | ||
version = "0.1.7" | ||
authors = ["Fuel Labs <[email protected]>"] | ||
edition = "2018" | ||
homepage = "https://fuel.network/" | ||
|
@@ -26,7 +26,7 @@ sha2 = "0.9" | |
smallvec = "1.7" | ||
source-span = "2.4" | ||
structopt = { version = "0.3", default-features = false, optional = true } | ||
sway-types = { version = "0.1.6", path = "../sway-types" } | ||
sway-types = { version = "0.1.7", path = "../sway-types" } | ||
thiserror = "1.0" | ||
uuid-b64 = "0.1" | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "sway-fmt" | ||
version = "0.1.6" | ||
version = "0.1.7" | ||
authors = ["Fuel Labs <[email protected]>"] | ||
edition = "2018" | ||
homepage = "https://fuel.network/" | ||
|
@@ -10,4 +10,4 @@ description = "Sway sway-fmt." | |
|
||
[dependencies] | ||
ropey = "1.2" | ||
sway-core = { version = "0.1.6", path = "../sway-core" } | ||
sway-core = { version = "0.1.7", path = "../sway-core" } |
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,6 +1,6 @@ | ||
[package] | ||
name = "sway-server" | ||
version = "0.1.6" | ||
version = "0.1.7" | ||
authors = ["Fuel Labs <[email protected]>"] | ||
edition = "2018" | ||
homepage = "https://fuel.network/" | ||
|
@@ -14,7 +14,7 @@ lspower = "1.0.0" | |
pest = { version = "3.0", package = "fuel-pest" } | ||
ropey = "1.2" | ||
serde_json = "1.0.60" | ||
sway-core = { version = "0.1.6", path = "../sway-core" } | ||
sway-fmt = { version = "0.1.6", path = "../sway-fmt" } | ||
sway-utils = { version = "0.1.6", path = "../sway-utils" } | ||
sway-core = { version = "0.1.7", path = "../sway-core" } | ||
sway-fmt = { version = "0.1.7", path = "../sway-fmt" } | ||
sway-utils = { version = "0.1.7", path = "../sway-utils" } | ||
tokio = { version = "1.3", features = ["io-std", "io-util", "macros", "net", "rt-multi-thread", "sync", "time"] } |
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,6 +1,6 @@ | ||
[package] | ||
name = "sway-types" | ||
version = "0.1.6" | ||
version = "0.1.7" | ||
authors = ["Fuel Labs <[email protected]>"] | ||
edition = "2018" | ||
homepage = "https://fuel.network/" | ||
|
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,6 +1,6 @@ | ||
[package] | ||
name = "sway-utils" | ||
version = "0.1.6" | ||
version = "0.1.7" | ||
authors = ["Fuel Labs <[email protected]>"] | ||
edition = "2021" | ||
homepage = "https://fuel.network/" | ||
|
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,12 +1,12 @@ | ||
[package] | ||
name = "test" | ||
version = "0.1.6" | ||
version = "0.1.7" | ||
authors = ["Fuel Labs <[email protected]>"] | ||
edition = "2018" | ||
publish = false | ||
|
||
[dependencies] | ||
forc = { version = "0.1.6", path = "../forc", features = ["test"], default-features = false } | ||
forc = { version = "0.1.7", path = "../forc", features = ["test"], default-features = false } | ||
fuel-asm = "0.1" | ||
fuel-tx = "0.1" | ||
fuel-vm = { version = "0.1", features = ["random"] } | ||
|
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
9 changes: 9 additions & 0 deletions
9
test/src/e2e_vm_tests/test_programs/trait_override_bug/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] | ||
name = "trait_override_bug" | ||
author = "Fuel Labs <[email protected]>" | ||
entry = "main.sw" | ||
license = "Apache-2.0" | ||
|
||
[dependencies] | ||
std = { git = "http://github.com/FuelLabs/sway-lib-std" } | ||
core = { git = "http://github.com/FuelLabs/sway-lib-core" } |
1 change: 1 addition & 0 deletions
1
test/src/e2e_vm_tests/test_programs/trait_override_bug/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 @@ | ||
[] |
36 changes: 36 additions & 0 deletions
36
test/src/e2e_vm_tests/test_programs/trait_override_bug/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,36 @@ | ||
script; | ||
|
||
|
||
// This bug was found by Nebula in discord. Adding this trait was causing other implementations on u64s to be overridden. | ||
|
||
pub trait Shiftable { | ||
fn lsh(self, other: Self) -> Self; | ||
fn rsh(self, other: Self) -> Self; | ||
|
||
} | ||
|
||
impl Shiftable for u64 { | ||
fn lsh(self, other: Self) -> Self { | ||
asm(r1 : self, r2: other, r3) { | ||
sll r3 r1 r2; | ||
r3: u64 | ||
} | ||
} | ||
|
||
fn rsh(self, other: Self) -> Self { | ||
asm(r1 : self, r2: other, r3) { | ||
srl r3 r1 r2; | ||
r3: u64 | ||
} | ||
} | ||
} | ||
|
||
fn foo() -> u64 { | ||
let mut x:u64 = 4; | ||
x = 5 + 2; | ||
x | ||
} | ||
|
||
fn main() -> u64 { | ||
foo() | ||
} |