Skip to content

gccrs: Fix ICE during method resolution#2158

Merged
philberty merged 1 commit into
masterfrom
phil/pr2
Apr 26, 2023
Merged

gccrs: Fix ICE during method resolution#2158
philberty merged 1 commit into
masterfrom
phil/pr2

Conversation

@philberty

Copy link
Copy Markdown
Member

We were missing a check for trait item selection to ensure they are actually methods and remove assertion to check if the trait item is a function this is a valid error check not an assertion.

Fixes #2139

gcc/rust/ChangeLog:

* typecheck/rust-hir-dot-operator.cc (MethodResolver::select): verify it is a method

gcc/testsuite/ChangeLog:

* rust/compile/issue-2139.rs: New test.

We were missing a check for trait item selection to ensure they are
actually methods and remove assertion to check if the trait item is a
function this is a valid error check not an assertion.

Fixes #2139

gcc/rust/ChangeLog:

	* typecheck/rust-hir-dot-operator.cc (MethodResolver::select): verify it is a method

gcc/testsuite/ChangeLog:

	* rust/compile/issue-2139.rs: New test.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
@philberty philberty added the bug label Apr 26, 2023
@philberty philberty added this pull request to the merge queue Apr 26, 2023
Merged via the queue into master with commit ddcd571 Apr 26, 2023
@philberty philberty deleted the phil/pr2 branch April 27, 2023 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

ICE with bad method resolution

1 participant