Skip to content

Commit

Permalink
Merge pull request #5053 from stacks-network/fix/handle-empty-args-in…
Browse files Browse the repository at this point in the history
…-define-trait-signature

fix: handle empty type_args in define-trait definition
  • Loading branch information
kantai authored Aug 9, 2024
2 parents 5aa1ed5 + 66793b1 commit beeebe6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clarity/src/vm/types/signatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1656,7 +1656,9 @@ impl TypeSignature {
clarity_version: ClarityVersion,
) -> Result<BTreeMap<ClarityName, FunctionSignature>> {
let mut trait_signature: BTreeMap<ClarityName, FunctionSignature> = BTreeMap::new();
let functions_types = type_args[0]
let functions_types = type_args
.get(0)
.ok_or_else(|| CheckErrors::InvalidTypeDescription)?
.match_list()
.ok_or(CheckErrors::DefineTraitBadSignature)?;

Expand Down

0 comments on commit beeebe6

Please sign in to comment.