Closed istvanrath closed 12 years ago
The generator should yield much less code by design, as the methods that the generated matchers provide over the generic version are mostly concerned with the parametrization, which does not make sense in a parameterless pattern.
I could not reproduce your issue: factory()
is there in the generated code. Perhaps you should show how you could produce the bug.
Introducing such a warning would make sense, however.
I could not reproduce your issue:
factory()
is there in the generated code.
Yes, but it (=the factory instance that it returns) doesn't have the usual methods available.
I checked again, and coudln't reproduce the previous issues, so the ticket is edited accordingly.
A validator has been added together with corresponding test cases.
By the way, editing an already filled issue by explicitely removing parts results in an interesting issue page.
The generator processes such patterns (and generates much less code) entirely silently, without any warning.
Additionally, as parameterless patterns are suspicious, they should be marked by a warning.