Skip to content

Commit

Permalink
Fixed #writeExtensionMethods:className: on TonelWriter to sort method…
Browse files Browse the repository at this point in the history
…s with the same selector consistently (putting the metaclass’s method first).
  • Loading branch information
Rinzwind committed Apr 21, 2024
1 parent 91b776d commit 84e5b7c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ writeExtensionMethods: methods className: className
definition := Dictionary new.
self at: #name put: className in: definition.
s << 'Extension ' << (self toSTON: definition) << nl.
(methods sorted: [ :a :b | a selector < b selector ]) do: [ :each |
self writeMethodDefinition: each on: s ] ]
(methods sorted: [ :a :b | a selector < b selector or: [ a selector = b selector and: [ a classIsMeta ] ] ])
do: [ :each | self writeMethodDefinition: each on: s ] ]

0 comments on commit 84e5b7c

Please sign in to comment.