Whole file

terryyin/lizard

The author described this change as fix issue https://github.com/terryyin/lizard/issues/309. It counts as a record because the check below fails on the code as it stood at 471ef1be1 and passes on 4891f1164, with nothing else changed between the two runs.

Fix saved2021-01-29
Sharing licenceMIT · LICENSE.txt
Change size+7 0

What the code was meant to do, written into the code itself as a save note

fix issue https://github.com/terryyin/lizard/issues/309

The change

205205 self.context.add_to_long_function_name(" " + token)
206206 elif token == 'throw':
207207 self._state = self._state_throw
208+ elif token == 'throws':
209+ self._state = self._state_throws
208210 elif token == '->':
209211 self._state = self._state_trailing_return
210212 elif token == 'noexcept':
230232 @CodeStateMachine.read_inside_brackets_then("()")
231233 def _state_throw(self, _):
232234 self._state = self._state_dec_to_imp
235+
236+ @CodeStateMachine.read_until_then(';{')
237+ def _state_throws(self, token, _):
238+ self._state = self._state_dec_to_imp
239+ self._state(token)
233240
234241 def _state_noexcept(self, token):
235242 if token == '(':

The check that tells the two apart

failpass·test/test_languages/testJava.py::TestJava::test_abstract_function_without_body_with_throws_following_method

Check file test/test_languages/testJava.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before it471ef1be1ce1d5575d9866a2287ccce2910cc66c
Broken version dated2020-10-20
Modulelizard_languages.clike
Units changedCLikeStates
Fingerprint4efc166374237faa
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.

Other bugs found in terryyin/lizard