Skip to content

Improve subtype check.#54

Merged
peterhuene merged 2 commits intomainfrom
subtype-check
Feb 14, 2024
Merged

Improve subtype check.#54
peterhuene merged 2 commits intomainfrom
subtype-check

Conversation

@peterhuene
Copy link
Copy Markdown
Member

This PR improves the subtype checking logic and the error messages it produces.

It fixes a bug where the targets check was not properly performing checks against imports, which should be contravariant.

Also fixes a warning relating to a deprecated function call; the fix is to not remove from the collection as we no longer have to since the bytes of a package are behind an Arc.

Additionally, fixes a bug in calculating of spans relating to expressions with postfix operations; incorrect length calculations would cause a panic when formatting errors with those spans.

This commit improves the subtype checking logic and the error messages it
produces.

It fixes a bug where the `targets` check was not properly performing checks
against imports, which should be contravariant.

Also fixes a warning relating to a deprecated function call; the fix is to not
remove from the collection as we no longer have to since the bytes of a package
are behind an `Arc`.
Comment thread crates/wac-parser/src/resolution/types.rs Outdated
@peterhuene peterhuene merged commit 4934326 into main Feb 14, 2024
@peterhuene peterhuene deleted the subtype-check branch February 14, 2024 00:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants