]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/d/dmd/parse.c
d: Implement expression-based contract syntax
authorIain Buclaw <ibuclaw@gdcproject.org>
Thu, 7 Jan 2021 17:30:30 +0000 (18:30 +0100)
committerIain Buclaw <ibuclaw@gdcproject.org>
Sat, 9 Jan 2021 22:45:46 +0000 (23:45 +0100)
commitacae7b21bc026150c2c01465e4ab0eacb20bd44d
treeb0ed635955a5668753257db827e230358448ee0d
parentf2a5346244a18c89bebac078657d0f74dbb24622
d: Implement expression-based contract syntax

Expression-based contract syntax has been added.  Contracts that consist
of a single assertion can now be written more succinctly and multiple
`in` or `out` contracts can be specified for the same function.

Reviewed-on: https://github.com/dlang/dmd/pull/12106

gcc/d/ChangeLog:

* dmd/MERGE: Merge upstream dmd e598f69c0.
gcc/d/dmd/MERGE
gcc/d/dmd/arraytypes.h
gcc/d/dmd/declaration.h
gcc/d/dmd/func.c
gcc/d/dmd/hdrgen.c
gcc/d/dmd/parse.c
gcc/d/dmd/statement.c
gcc/d/dmd/statement.h
gcc/testsuite/gdc.test/compilable/extra-files/header1.d
gcc/testsuite/gdc.test/fail_compilation/fail17502.d
gcc/testsuite/gdc.test/runnable/testcontracts.d