New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix mac-os regression in apply generic arguments to method calls #1632
Conversation
@philberty I plan on trying to ssh into the MacOS CI later today. @simonpcook tried building the project and running the test on his Mac machine, and they were all passing. This is a very suspicious failure |
@CohenArthur i just noticed they have updated their macos version.
I was going through to see if any commit would have affected this and there is nothing standing out to me. It seemed to have just crept in because I merged the first closures PR without your fix to the closure parsing and I guess we just couldn't notice. |
@philberty the bug is really weird and comes from the typesystem. I'm assuming it's UB or some other memory shenanigans. The type resolution just... fails for no apparent reason |
this is the debug log btw |
Yeah it looks like the HIR::GenericArgs structure says it is not empty but the type args are empty so something going on with the structure there. The test that fails we have a function call like |
135f54f
to
d7e1cc6
Compare
@philberty I am cleaning up our unused parameters and noticed some dangling references warnings around type candidates. I'm going to push a PR soon and hopefully it should fix the undefined behavior that causes these issues. |
d7e1cc6
to
30fcfd0
Compare
This adds missing copy constructors to HIR::PathExprSegment which were wrongly defaulting to empty vectors when apply specified generic arguments to method calls.
30fcfd0
to
48b11d3
Compare
I've fixed this issues on those 3 test cases!!!!
|
There is one final issue with one of the debug test-cases which I think is a regression from: https://github.com/Rust-GCC/gccrs/pull/1663/files as its the same test failing |
…ols and its only for debug info
bors r+ |
Build succeeded: |
When applying generic arguments to method calls such as:
receiver.method_name<i32, bool>()
This ended up wrongly using the default constructor with an empty generic arguments which seems
like a possible bug in the new version of clang. This explicitly sets up all relevant copy constructors
for HIR::PathExprSegment and removes the defaults.