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

[dmd-cxx] fix Issue 22133 - [REG2.097] Breaking change in DotTemplateExp type semantics leading to e.g. isInputRange regression #12920

Merged
merged 1 commit into from
Jul 25, 2021

Conversation

ibuclaw
Copy link
Member

@ibuclaw ibuclaw commented Jul 25, 2021

Backport of #12897.

…Exp type semantics leading to e.g. isInputRange regression
@ibuclaw ibuclaw added Regression PRs that fix regressions GDC Gnu D Compiler C++ Port labels Jul 25, 2021
@dlang-bot
Copy link
Contributor

Thanks for your pull request, @ibuclaw!

Bugzilla references

Auto-close Bugzilla Severity Description
22133 regression [REG2.097] Breaking change in DotTemplateExp type semantics leading to e.g. isInputRange regression

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 "dmd-cxx + dmd#12920"

@ibuclaw
Copy link
Member Author

ibuclaw commented Jul 25, 2021

This found its way into dmd-cxx via #12668, which addressed many latent bugs in static foreach (including missing 16-bit support).

@dlang-bot dlang-bot merged commit 1d8386a into dlang:dmd-cxx Jul 25, 2021
@ibuclaw ibuclaw deleted the dmd-cxx-22133 branch July 25, 2021 15:31
nstester pushed a commit to nstester/gcc that referenced this pull request Jul 28, 2021
…01619)

By giving dot templates a type, meant that properry resolving silently
started passing for code that should never have passed.  The simple fix
is to provide implementations for checkType and checkValue that give an
error about dot templates having neither a value nor type.

Reviewed-on: dlang/dmd#12920

	PR d/101619

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 1d8386a63.
kraj pushed a commit to kraj/gcc that referenced this pull request Jul 28, 2021
…01619)

By giving dot templates a type, meant that properry resolving silently
started passing for code that should never have passed.  The simple fix
is to provide implementations for checkType and checkValue that give an
error about dot templates having neither a value nor type.

Reviewed-on: dlang/dmd#12920

	PR d/101619

gcc/d/ChangeLog:

	* dmd/expression.c (DotTemplateExp::checkType): New function.
	(DotTemplateExp::checkValue): New function.
	* dmd/expression.h (class DotTemplateExp): Declare checkType and
	checkValue.

gcc/testsuite/ChangeLog:

	* gdc.test/fail_compilation/fail7424b.d: Update test.
	* gdc.test/fail_compilation/fail7424c.d: Update test.
	* gdc.test/fail_compilation/fail7424d.d: Update test.
	* gdc.test/fail_compilation/fail7424e.d: Update test.
	* gdc.test/fail_compilation/fail7424f.d: Update test.
	* gdc.test/fail_compilation/fail7424g.d: Update test.
	* gdc.test/fail_compilation/fail7424h.d: Update test.
	* gdc.test/fail_compilation/fail7424i.d: Update test.
	* gdc.test/compilable/test22133.d: New test.
	* gdc.test/fail_compilation/fail22133.d: New test.

(cherry picked from commit 3e21361)
kraj pushed a commit to kraj/gcc that referenced this pull request Jul 28, 2021
…01619)

By giving dot templates a type, meant that properry resolving silently
started passing for code that should never have passed.  The simple fix
is to provide implementations for checkType and checkValue that give an
error about dot templates having neither a value nor type.

Reviewed-on: dlang/dmd#12920

	PR d/101619

gcc/d/ChangeLog:

	* dmd/expression.c (DotTemplateExp::checkType): New function.
	(DotTemplateExp::checkValue): New function.
	* dmd/expression.h (class DotTemplateExp): Declare checkType and
	checkValue.

gcc/testsuite/ChangeLog:

	* gdc.test/fail_compilation/fail7424b.d: Update test.
	* gdc.test/fail_compilation/fail7424c.d: Update test.
	* gdc.test/fail_compilation/fail7424d.d: Update test.
	* gdc.test/fail_compilation/fail7424e.d: Update test.
	* gdc.test/fail_compilation/fail7424f.d: Update test.
	* gdc.test/fail_compilation/fail7424g.d: Update test.
	* gdc.test/fail_compilation/fail7424h.d: Update test.
	* gdc.test/fail_compilation/fail7424i.d: Update test.
	* gdc.test/compilable/test22133.d: New test.
	* gdc.test/fail_compilation/fail22133.d: New test.

(cherry picked from commit 3e21361)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge C++ Port GDC Gnu D Compiler Regression PRs that fix regressions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants