stan icon indicating copy to clipboard operation
stan copied to clipboard

Add 'fromIntegral' inspection as anti-pattern

Open chshersh opened this issue 5 years ago • 0 comments

fromIntegral produces unexpected results for almost all types and is partial for Natural. We can recommend safer versions of this function.

  • toIntegralSized from base

Additionally, we can add possible solutions for already existing fromInteger inspection:

  • Suggest integerToBounded
  • Suggest integerToNatural

chshersh avatar Aug 10 '20 14:08 chshersh