Vermin assumes byte union to be a type union
See original GitHub issueDescribe the bug
The following line is assumed to be a type union (3.10) by vermin:
if (global_byte | local_byte) != global_byte:
To Reproduce Found while scanning the kafl.fuzzer project with vermin.
$ vermin -vvv kafl_fuzzer | grep 3.10
!2, 3.10 /home/mtarral/kAFL/kafl/fuzzer/kafl_fuzzer/manager/bitmap.py
L93: union types as `X | Y` requires !2, 3.10
Minimum required versions: 3.10
You can check the “faulty” line
Expected behavior
This shouldn’t be flagged as a union type (and shouldn’t require 3.10, since our software runs fine on 3.8)
Environment (please complete the following information):
- Vermin version: 1.4.2 (pip)
Thanks for vermin !
Issue Analytics
- State:
- Created a year ago
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Handbook - Unions and Intersection Types - TypeScript
A union type describes a value that can be one of several types. We use the vertical bar ( | ) to separate...
Read more >Union declaration - cppreference.com
A union is a type consisting of a sequence of members whose storage overlaps (as opposed to struct, which is a type consisting...
Read more >Union type - Wikipedia
A union can be pictured as a chunk of memory that is used to store variables of different data types. Once a new...
Read more >Can a type which is a union member alias that union?
In this example, pointers to int and double, both of which are members of union u, are passed to a function where a...
Read more >The worst mistake of computer science - Lucidchart
The essential difference is that there is no more union–statically typed or dynamically assumed–between NULL and every other type, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Yes, I confirm it works on my side !
Thank you very much 🙏
Hi! It’s in a branch right now. I was able to reproduce and fix it.
You can try it out:
issue-103