Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add repro for issue #6335. #6730

Merged
merged 3 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[[package]]
name = "core"
source = "path+from-root-2A7B279266ACFF97"

[[package]]
name = "issue_6335_repro"
source = "member"
dependencies = ["std"]

[[package]]
name = "std"
source = "path+from-root-2A7B279266ACFF97"
dependencies = ["core"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[project]
authors = ["Fuel Labs <[email protected]>"]
entry = "main.sw"
implicit-std = false
license = "Apache-2.0"
name = "issue_6335_repro"

[dependencies]
std = { path = "../../../../reduced_std_libs/sway-lib-std-conversions" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
contract;

use std::bytes::*;

abi MyAbi {
fn test() -> u64;
}

abi FakeAbi {
fn test() -> Bytes;
}

impl MyAbi for Contract {
fn test() -> u64 {
64
}
}

#[test]
fn test() {
let caller = abi(FakeAbi, CONTRACT_ID);
let res = caller.test();
assert(res.len() == 64);
let s: str[30] = abi_decode(res.as_raw_slice());
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
category = "compile"
validate_abi = false
validate_storage_slots = false
expected_warnings = 0
Loading