|
| 1 | +Ddoc |
| 2 | + |
| 3 | +$(CHANGELOG_NAV_INJECT) |
| 4 | + |
| 5 | +$(VERSION Jul 15, 2022, =================================================, |
| 6 | + |
| 7 | +$(CHANGELOG_HEADER_STATISTICS |
| 8 | +$(VER) comes with 1 major change and 16 fixed Bugzilla issues. |
| 9 | + A huge thanks goes to the |
| 10 | + $(LINK2 #contributors, 13 contributors) |
| 11 | + who made $(VER) possible.) |
| 12 | + |
| 13 | +$(BUGSTITLE_TEXT_HEADER Compiler changes, |
| 14 | + |
| 15 | +$(LI $(RELATIVE_LINK2 deprecate_scope_failure_return,`scope(failure)` blocks that contain `return` statements are now deprecated)) |
| 16 | + |
| 17 | +) |
| 18 | + |
| 19 | +$(CHANGELOG_SEP_HEADER_TEXT_NONEMPTY) |
| 20 | + |
| 21 | +$(CHANGELOG_SEP_HEADER_TEXT) |
| 22 | + |
| 23 | +$(BUGSTITLE_TEXT_BODY Compiler changes, |
| 24 | + |
| 25 | +$(LI $(LNAME2 deprecate_scope_failure_return,`scope(failure)` blocks that contain `return` statements are now deprecated) |
| 26 | +$(CHANGELOG_SOURCE_FILE dmd, changelog/deprecate_scope_failure_return.dd) |
| 27 | +$(P |
| 28 | +Starting with this release, having a `return` statement in the body of a `scope(failure)` |
| 29 | +statement is deprecated. Having the ability to `return` from such blocks is error prone since currently, Errors are also handled by `scope(failure)`. This leads to the following situation: |
| 30 | +) |
| 31 | + |
| 32 | +--- |
| 33 | +ulong get () @safe nothrow |
| 34 | +{ |
| 35 | + scope (failure) return 10; |
| 36 | + throw new Error(""); |
| 37 | +} |
| 38 | + |
| 39 | +void main () @safe |
| 40 | +{ |
| 41 | + assert(get() == 10); // passes |
| 42 | +} |
| 43 | +--- |
| 44 | + |
| 45 | +$(P |
| 46 | +where an error is circumvented by a return. If a return is indeed desired |
| 47 | +in such situations, then the solution is to simply use a try-catch block |
| 48 | +for the function body. |
| 49 | +) |
| 50 | + |
| 51 | +$(P |
| 52 | +Note: `scope(exit)` and `scope(success)` already present this restriction. |
| 53 | +) |
| 54 | +) |
| 55 | + |
| 56 | + |
| 57 | +) |
| 58 | + |
| 59 | +$(CHANGELOG_SEP_TEXT_BUGZILLA) |
| 60 | + |
| 61 | +$(BUGSTITLE_BUGZILLA DMD Compiler regression fixes, |
| 62 | + |
| 63 | +$(LI $(BUGZILLA 23100): empty array literal passed to scope param not 'falsey' anymore) |
| 64 | +$(LI $(BUGZILLA 23148): Missing invariant symbol with static library when template function declares struct with destructor and invariant that instantiates template with lambda, also main has a lambda) |
| 65 | +$(LI $(BUGZILLA 23170): Array literal passed to map in lambda, then returned from nested function, is memory corrupted) |
| 66 | +$(LI $(BUGZILLA 23172): [REG2.100] Wrong cast inserted for ternary operator and non-int enums) |
| 67 | +$(LI $(BUGZILLA 23181): [REG 2.099] AssertError@src/dmd/e2ir.d$(LPAREN)6094$(RPAREN): Trying reference _d_arraysetctor) |
| 68 | +) |
| 69 | +$(BUGSTITLE_BUGZILLA DMD Compiler bug fixes, |
| 70 | + |
| 71 | +$(LI $(BUGZILLA 20143): ICE in optimizer on real 0/0 returned as double) |
| 72 | +$(LI $(BUGZILLA 21443): scope $(LPAREN)failure$(RPAREN) with a return breaks safety) |
| 73 | +$(LI $(BUGZILLA 21723): Linker error: two module static library, main compiled inline, invariant that defines a function, type alias, and an alias lambda) |
| 74 | +$(LI $(BUGZILLA 23082): stringof of template alias overloaded with function accessed by trait: segfault.) |
| 75 | +$(LI $(BUGZILLA 23102): pinholeopt, "Conditional jump or move depends on uninitialised value$(LPAREN)s$(RPAREN)") |
| 76 | +$(LI $(BUGZILLA 23108): ICE: AssertError@src/dmd/clone.d$(LPAREN)567$(RPAREN): Assertion failure) |
| 77 | +$(LI $(BUGZILLA 23109): ICE: AssertError@src/dmd/dclass.d$(LPAREN)449$(RPAREN): Assertion failure) |
| 78 | +$(LI $(BUGZILLA 23114): Can't use noreturn operand in arithmetic expression) |
| 79 | +$(LI $(BUGZILLA 23120): dmd illegal instruction throw expression) |
| 80 | +$(LI $(BUGZILLA 23166): seg fault when compiling with -inline) |
| 81 | +) |
| 82 | +$(BUGSTITLE_BUGZILLA Phobos regression fixes, |
| 83 | + |
| 84 | +$(LI $(BUGZILLA 23132): "cannot access frame pointer" comparing two ranges for equality from v2.099.0) |
| 85 | +) |
| 86 | +) |
| 87 | +$(D_CONTRIBUTORS_HEADER 13) |
| 88 | +$(D_CONTRIBUTORS |
| 89 | + $(D_CONTRIBUTOR Boris Carvajal) |
| 90 | + $(D_CONTRIBUTOR Dennis) |
| 91 | + $(D_CONTRIBUTOR Dennis Korpel) |
| 92 | + $(D_CONTRIBUTOR FeepingCreature) |
| 93 | + $(D_CONTRIBUTOR Iain Buclaw) |
| 94 | + $(D_CONTRIBUTOR Martin Kinkelin) |
| 95 | + $(D_CONTRIBUTOR Martin Nowak) |
| 96 | + $(D_CONTRIBUTOR Mathis Beer) |
| 97 | + $(D_CONTRIBUTOR mhh) |
| 98 | + $(D_CONTRIBUTOR Razvan Nitu) |
| 99 | + $(D_CONTRIBUTOR richard andrew cattermole) |
| 100 | + $(D_CONTRIBUTOR Tomáš Chaloupka) |
| 101 | + $(D_CONTRIBUTOR Walter Bright) |
| 102 | +) |
| 103 | +$(D_CONTRIBUTORS_FOOTER) |
| 104 | +$(CHANGELOG_NAV_INJECT) |
| 105 | + |
| 106 | +Macros: |
| 107 | + VER=2.100.1 |
| 108 | + TITLE=Change Log: $(VER) |
0 commit comments