diff --git a/tests/pda-derivation/programs/pda-derivation/src/lib.rs b/tests/pda-derivation/programs/pda-derivation/src/lib.rs index 5b2a4bd6f5..f2a5352c63 100644 --- a/tests/pda-derivation/programs/pda-derivation/src/lib.rs +++ b/tests/pda-derivation/programs/pda-derivation/src/lib.rs @@ -59,6 +59,10 @@ pub mod pda_derivation { pub fn unsupported_program_seed(_ctx: Context) -> Result<()> { Ok(()) } + + pub fn call_expr_with_no_args(_ctx: Context) -> Result<()> { + Ok(()) + } } #[derive(Accounts)] @@ -210,6 +214,16 @@ fn external_function_with_an_argument(pk: &Pubkey) -> Pubkey { *pk } +#[derive(Accounts)] +pub struct CallExprWithNoArgs<'info> { + #[account( + seeds = [System::id().as_ref()], + seeds::program = System::id(), + bump + )] + pub pda: UncheckedAccount<'info>, +} + #[account] pub struct MyAccount { data: u64, diff --git a/tests/pda-derivation/tests/typescript.spec.ts b/tests/pda-derivation/tests/typescript.spec.ts index 8c4059d3e7..203b270b23 100644 --- a/tests/pda-derivation/tests/typescript.spec.ts +++ b/tests/pda-derivation/tests/typescript.spec.ts @@ -142,4 +142,8 @@ describe("typescript", () => { // @ts-expect-error expect(acc.pda).to.be.undefined; }); + + it("Can resolve call expressions with no arguments", async () => { + await program.methods.callExprWithNoArgs().rpc(); + }); });