Skip to content

Commit

Permalink
AutoMockable: fix generating static reset func (#1336)
Browse files Browse the repository at this point in the history
- don't generate invalid code (see
#1335)
- use type's access level for generated reset() function
  • Loading branch information
MontakOleg authored Jun 22, 2024
1 parent 2f8fc64 commit 33f948a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Templates/Templates/AutoMockable.stencil
Original file line number Diff line number Diff line change
Expand Up @@ -384,9 +384,9 @@ import {{ import }}
{% endfor %}

{% if type.allMethods|static|count != 0 and type.allMethods|initializer|count != type.allMethods|static|count %}
static func reset()
{% call accessLevel type.accessLevel %}static func reset()
{
{% for method in type.allMethods|static %}
{% for method in type.allMethods|static|!definedInExtension %}
{% call resetMethod method %}
{% endfor %}
}
Expand Down

0 comments on commit 33f948a

Please sign in to comment.