Skip to content
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 Issue 22765 - Assertion failure in CppMangleVisitor.template_args #15100

Merged
merged 1 commit into from Apr 13, 2023

Conversation

RazvanN7
Copy link
Contributor

Replace assert with an error message.

The error looks weird, but I just followed the pattern already present. Rewording the error should be the subject of a different PR.

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @RazvanN7! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
22765 critical Assertion failure in CppMangleVisitor.template_args

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "stable + dmd#15100"

@RazvanN7 RazvanN7 merged commit b7b1d8f into dlang:stable Apr 13, 2023
33 of 44 checks passed
@ibuclaw ibuclaw mentioned this pull request Apr 16, 2023
@ibuclaw ibuclaw mentioned this pull request May 1, 2023
/*
TEST_OUTPUT:
---
fail_compilation/test22765.d(14): Error: template instance `test22765.Template!null` internal compiler error: C++ `null` template value parameter is not supported
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Internal compiler errors should never be reachable, so this PR introduced a regression.

@ibuclaw
Copy link
Member

ibuclaw commented May 2, 2023

This PR introduced a regression https://issues.dlang.org/show_bug.cgi?id=23878

@dkorpel
Copy link
Contributor

dkorpel commented May 2, 2023

It's not a regression when it used to be worse (an assertion failure). Note the PR description:

The error looks weird, but I just followed the pattern already present. Rewording the error should be the subject of a different PR.

@ibuclaw
Copy link
Member

ibuclaw commented May 3, 2023

The current understanding is that the fix should be elsewhere during semantic, not when we're generating the mangling after the point it should have been caught.

An ICE is still an ICE, so this test has to be thrown out until a proper fix is done.

FAIL: gdc.test/fail_compilation/test22765.d   (internal compiler error: C++ 'null' template value parameter is not supported)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants