MikePopoloski / slang

SystemVerilog compiler and language services
MIT License
620 stars 138 forks source link

[slang] Fix virtual interface comparison #915

Closed likeamahoney closed 8 months ago

likeamahoney commented 8 months ago

systemverilog LRM (for example IEEE 1800-2017 or IEEE 1800-2023) 25.9 clause says:

— Equality ( == ) and inequality ( != ) with the following: • Another virtual interface of the same type • An interface instance of the same type • The special constant null

It follows that virtual interfaces can be compared with instances of the same type which is not supported by slang for now.

I fixed this at that PR.

codecov[bot] commented 8 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 93.75%. Comparing base (cad562f) to head (4fc070b).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/MikePopoloski/slang/pull/915/graphs/tree.svg?width=650&height=150&src=pr&token=sS5JjK9091&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski)](https://app.codecov.io/gh/MikePopoloski/slang/pull/915?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski) ```diff @@ Coverage Diff @@ ## master #915 +/- ## ======================================= Coverage 93.75% 93.75% ======================================= Files 190 190 Lines 47784 47799 +15 ======================================= + Hits 44799 44814 +15 Misses 2985 2985 ``` | [Files](https://app.codecov.io/gh/MikePopoloski/slang/pull/915?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski) | Coverage Δ | | |---|---|---| | [source/ast/expressions/OperatorExpressions.cpp](https://app.codecov.io/gh/MikePopoloski/slang/pull/915?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski#diff-c291cmNlL2FzdC9leHByZXNzaW9ucy9PcGVyYXRvckV4cHJlc3Npb25zLmNwcA==) | `87.87% <100.00%> (+0.12%)` | :arrow_up: | ------ [Continue to review full report in Codecov by Sentry](https://app.codecov.io/gh/MikePopoloski/slang/pull/915?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://app.codecov.io/gh/MikePopoloski/slang/pull/915?dropdown=coverage&src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski). Last update [cad562f...4fc070b](https://app.codecov.io/gh/MikePopoloski/slang/pull/915?dropdown=coverage&src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Michael+Popoloski).
MikePopoloski commented 8 months ago

Thanks for the PR!