[Bug d/101619] d: Change in DotTemplateExp type semantics leading to regression
cvs-commit at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Jul 28 11:36:39 GMT 2021
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101619
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Iain Buclaw
<ibuclaw@gcc.gnu.org>:
https://gcc.gnu.org/g:aa706e16180eb8c1e7d5b398d7604476f109758d
commit r11-8806-gaa706e16180eb8c1e7d5b398d7604476f109758d
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date: Sun Jul 25 19:54:08 2021 +0200
d: Change in DotTemplateExp type semantics leading to regression (PR101619)
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: https://github.com/dlang/dmd/pull/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 3e2136117487fa839f7601c3e22a2856978fb9d0)
More information about the Gcc-bugs
mailing list