Skip to content

Commit

Permalink
check declaration kind instead of type
Browse files Browse the repository at this point in the history
  • Loading branch information
turbolent committed Jan 24, 2023
1 parent 36f2848 commit bb6beba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/sema/check_transaction_declaration.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ func (checker *Checker) declareTransactionDeclaration(declaration *ast.Transacti
roleDeclaration.Identifier,
)

if _, ok := member.TypeAnnotation.Type.(*TransactionRoleType); ok {
if member.DeclarationKind == common.DeclarationKindTransactionRole {
checker.report(
&DuplicateTransactionRoleError{
Name: roleName,
Expand Down

0 comments on commit bb6beba

Please sign in to comment.