Skip to content

Commit beeebe6

Browse files
authored
Merge pull request #5053 from stacks-network/fix/handle-empty-args-in-define-trait-signature
fix: handle empty type_args in define-trait definition
2 parents 5aa1ed5 + 66793b1 commit beeebe6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

clarity/src/vm/types/signatures.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1656,7 +1656,9 @@ impl TypeSignature {
16561656
clarity_version: ClarityVersion,
16571657
) -> Result<BTreeMap<ClarityName, FunctionSignature>> {
16581658
let mut trait_signature: BTreeMap<ClarityName, FunctionSignature> = BTreeMap::new();
1659-
let functions_types = type_args[0]
1659+
let functions_types = type_args
1660+
.get(0)
1661+
.ok_or_else(|| CheckErrors::InvalidTypeDescription)?
16601662
.match_list()
16611663
.ok_or(CheckErrors::DefineTraitBadSignature)?;
16621664

0 commit comments

Comments
 (0)