Open nbraud opened 9 years ago
@iphydf: Confirm we don't want that either?
This is correct, but we do want () for Unit-returning, or actually even for effectful methods (not sure we can enforce that.. maybe we can have a @pure
annotation for that, but that's a lot more work to verify). For now, any nullary method returning non-Unit should not have (), any nullary method returning Unit should.
In this particular example, we also check for "public method has explicit type", already checked by Scalastyle, so we don't need to check for that.
Currenly, code such as the following compiles without warning:
def method
should be used instead ofdef method()
.