lang: Fix incorrectly checking the first init constraint (#2483)

This commit is contained in:
CanardMandarin 2023-05-07 11:03:37 +02:00 committed by GitHub
parent ac86e15756
commit d1ddf00293
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -162,7 +162,7 @@ fn constraints_cross_checks(fields: &[AccountField]) -> ParseResult<()> {
));
}
}
match kind {
match &field.constraints.init.as_ref().unwrap().kind {
// This doesn't catch cases like account.key() or account.key.
// My guess is that doesn't happen often and we can revisit
// this if I'm wrong.