-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
c/bugCategory: A issue or PR related to a bugCategory: A issue or PR related to a bug
Description
🐞Bug Report
Bug Description
Gremlins does not support generics, which were added to Go as of 1.18. Specifically the union operator ("|") allows type constraints to contain multiple types. Gremlins incorrectly labels this as an INVERT_BITWISE operation and declares it "NOT COVERED" regardless of tests.
To Reproduce
Steps to reproduce the behavior:
- Create a trivial go program that uses a type interface with union, e.g.:
type IntorString interface { ~int | ~string } - Create a test file that tests the program
- Create a .gremlins.yml as thus:
unleash:
mutants:
invert-bitwise:
enabled: true - Execute gremlins unleash
- Result will contain:
NOT COVERED INVERT_BITWISE at ....
Expected behaviour
Gremlins will ignore the | characters, as they are not bitwise operators in this context
Screenshots
Operating System
Should be platform agnostic
Additional Context
Metadata
Metadata
Assignees
Labels
c/bugCategory: A issue or PR related to a bugCategory: A issue or PR related to a bug