Skip to content

Commit e65e637

Browse files
committed
Merge remote-tracking branch 'upstream/master' into stable
2 parents c05cb97 + 378eb8e commit e65e637

File tree

17 files changed

+156
-58
lines changed

17 files changed

+156
-58
lines changed

articles/template-comparison.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ class Foo< Bar<T,U> >
575575

576576
$(TR
577577
$(TD $(SFINAE))
578-
$(TD Yes)
578+
$(TD No)
579579
$(TD Yes)
580580
$(TD No change)
581581
)

dcompiler.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ $(H2 $(LNAME2 requirements, Requirements and Downloads))
5858
$(H2 $(LNAME2 installation, Installation))
5959

6060
$(WINDOWS
61-
$(MESSAGE_BOX gray, $(B Hint) - The official $(LINK2 $(ROOT_DIR)download.sh, installer)
61+
$(MESSAGE_BOX gray, $(B Hint) - The official $(LINK2 $(ROOT_DIR)download.html, installer)
6262
performs these steps automatically.
6363
)
6464
$(P Open a console window (for Windows XP this is done by

dpl-docs/views/layout.dt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ html(lang='en-US')
229229
script(type='text/javascript', src='https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js')
230230
|
231231
script(type='text/javascript').
232-
window.jQuery || document.write('\\x3Cscript src="#{root_dir}js/jquery-1.7.2.min.js">\\x3C/script>')
232+
window.jQuery || document.write('\x3Cscript src="#{root_dir}js/jquery-1.7.2.min.js">\x3C/script>')
233233
|
234234
script(type='text/javascript', src='#{root_dir}js/codemirror-compressed.js')
235235
|

dstyle.dd

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,17 +296,19 @@ $(H4 $(LNAME2 phobos_line_length, Line length))
296296
80 characters long but that they $(I can) exceed 80 characters when
297297
appropriate. However, they can $(I never) exceed 120 characters.)
298298
$(LISTSECTION phobos_whitespace, Whitespace,
299-
$(LI Put a space after `for`, `foreach`, `if`, and `while`: )
299+
$(LI Put a space after `for`, `foreach`, `if`, `while`, and `version`: )
300300
-------------------------------
301301
for (…) { … }
302302
foreach (…) { … }
303+
static foreach (…) { … }
303304
if (x) { … }
304305
static if (x) { … }
305306
while (…) { … }
306307
do { … } while (…);
308+
version (…) { … }
307309
-------------------------------
308-
$(LI Chains containing `else if (…)` or `else static if (…)` should set the
309-
keywords on the same line:)
310+
$(LI Chains containing `else if (…)`, `else static if (…)` or `else version (…)`
311+
should set the keywords on the same line:)
310312
-------------------------------
311313
if (…)
312314
{
@@ -380,6 +382,19 @@ $(LISTSECTION phobos_declarations, Declarations,
380382
-------------------------------
381383
void foo(R)(R r)
382384
if (R == 1)
385+
-------------------------------
386+
$(LI Pre and post contracts should have the same indentation level as their
387+
declaration. Put no space between `in`/`out` and an open parenthesis:)
388+
-------------------------------
389+
int foo(int r)
390+
in(r == 0)
391+
out(result; result == 0)
392+
do { … }
393+
394+
int foo(int r)
395+
in { … }
396+
out(result) { … }
397+
do { … }
383398
-------------------------------
384399
)
385400
$(LISTSECTION phobos_class_struct_field_declaration, Class/Struct Field Declarations,

foundation/sponsors.dd

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,24 @@ $(UL
2727
$(LI Symmetry Investments)
2828
$(LI John Hall)
2929
$(LI Gerhardus Jansen)
30+
$(LI Radu Racariu)
3031
$(LI Bastiaan Veelo)
3132
$(LI Sepany)
33+
$(LI George Toutoungis)
3234
$(LI Ali Çehreli)
3335
$(LI Longinus Ulyanovsky)
3436
$(LI Jack Applegame)
3537
$(LI Emil Nicolaie Perhinschi)
3638
$(LI Georges Robert)
39+
$(LI JR)
3740
$(LI D. Gilliland)
38-
$(LI George Toutoungis)
3941
$(LI Alexander Bothe)
4042
$(LI Unity Technologies ApS)
41-
$(LI JR)
43+
$(LI C. Piker)
4244
$(LI Jared Hanson)
4345
$(LI Zhang Zongren)
44-
$(LI C. Piker)
4546
$(LI Dag)
47+
$(LI Paul)
4648
$(LI Sebastian Wilzbach)
4749
)
4850

index.dd

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,23 @@ $(SCRIPT
304304
})();
305305
)
306306

307+
$(DIVC call_to_donate,
308+
<h2>Support the D language</h2>
309+
<p class="center">D is made possible through the hard work and dedication of many volunteers,
310+
with the coordination and outreach of the D Language Foundation, a 501(c)(3) non-profit organization.
311+
You can help further the development of the D language and help grow our
312+
community by supporting the Foundation.
313+
</p>
314+
<p class="center">
315+
<a href="$(ROOT_DIR)foundation/donate.html" class="btn call_to_donate_btn">Donate</a>
316+
<a href="$(ROOT_DIR)foundation/index.html" class="btn subdued">Learn More About The Foundation</a>
317+
$(BR)
318+
$(BR)
319+
Lots of $(WHY_D_ICON heart) to our $(LINK2 $(ROOT_DIR)foundation/sponsors.html, sponsors) and
320+
$(LINK2 $(ROOT_DIR)foundation/contributors, contributors).
321+
</p>
322+
)
323+
307324
$(DIVC org_list_header,
308325
<h3 class="center">
309326
Industry Proven
@@ -680,23 +697,6 @@ consistency. $(LINK2 spec/memory-safe-d.html, Read more).)
680697
) $(COMMENT SECTION1)
681698
) $(COMMENT D_S)
682699

683-
$(DIVC call_to_donate,
684-
<h2>Support the D language</h2>
685-
<p class="center">D is made possible through the hard work and dedication of many volunteers,
686-
with the coordination and outreach of the D Language Foundation, a 501(c)(3) non-profit organization.
687-
You can help further the development of the D language and help grow our
688-
community by supporting the Foundation.
689-
</p>
690-
<p class="center">
691-
<a href="$(ROOT_DIR)foundation/donate.html" class="btn call_to_donate_btn">Donate</a>
692-
<a href="$(ROOT_DIR)foundation/index.html" class="btn subdued">Learn More About The Foundation</a>
693-
$(BR)
694-
$(BR)
695-
Lots of $(WHY_D_ICON heart) to our $(LINK2 $(ROOT_DIR)foundation/sponsors.html, sponsors) and
696-
$(LINK2 $(ROOT_DIR)foundation/contributors, contributors).
697-
</p>
698-
)
699-
700700
Macros:
701701
TITLE=Home
702702
TAG=<$1>$+</$1>

js/platform-downloads.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@
1313

1414
var files;
1515
if (platform.indexOf('win') != -1)
16-
files = [{name: 'dmd-' + latest, suffix: '.exe'}];
16+
files = [{name: 'dmd-' + latest, suffix: '.exe', text: 'Windows Installer'}];
1717
else if (platform.indexOf('mac') != -1)
18-
files = [{name: 'dmd.' + latest, suffix: '.dmg'}];
18+
files = [{name: 'dmd.' + latest, suffix: '.dmg', text: 'DMG File'}];
1919
else if (model == null) // platforms with multiple archs follow
2020
return;
2121
else if (platform.indexOf('linux') != -1)
22-
files = [{name: 'dmd_' + latest + '-0_' + (model == 64 ? 'amd64' : 'i386'), suffix: '.deb'},
23-
{name: 'dmd-' + latest + '-0.fedora.' + (model == 64 ? 'x86_64' : 'i386'), suffix: '.rpm'}
22+
files = [{name: 'dmd_' + latest + '-0_' + (model == 64 ? 'amd64' : 'i386'), suffix: '.deb', text: 'DEB File'},
23+
{name: 'dmd-' + latest + '-0.fedora.' + (model == 64 ? 'x86_64' : 'i386'), suffix: '.rpm', text: 'RPM File'}
2424
];
2525
else if (platform.indexOf('freebsd') != -1)
26-
files = [{name: 'dmd.' + latest + '.freebsd-' + model.toString(), suffix: '.tar.xz'}];
26+
files = [{name: 'dmd.' + latest + '.freebsd-' + model.toString(), suffix: '.tar.xz', text: 'Compressed Archive'}];
2727
else
2828
return;
2929

3030
var html = '';
3131
for (var i = 0; i < files.length; ++i) {
3232
var f = files[i];
3333
var url = 'http://downloads.dlang.org/releases/2.x/' + latest + '/' + f.name + f.suffix;
34-
html += '<a href="' + url + '" class="btn action">Install ' + f.suffix + '</a>';
34+
html += '<a href="' + url + '" class="btn action">Download ' + f.text + '</a>';
3535
}
3636
if (files.length > 1) {
3737
html = '<div class="hbox">' + html + '</div>';

spec/class.dd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ $(GRAMMAR
874874
$(GNAME ClassInvariant):
875875
$(D invariant $(LPAREN) $(RPAREN)) $(GLINK2 statement, BlockStatement)
876876
$(D invariant) $(GLINK2 statement, BlockStatement)
877-
$(D invariant $(LPAREN)) $(GLINK2 expression, ContractArguments) $(D $(RPAREN) ;)
877+
$(D invariant $(LPAREN)) $(GLINK2 expression, AssertArguments) $(D $(RPAREN) ;)
878878
)
879879

880880
$(P $(I ClassInvariant) specify the relationships among the members of a class instance.

spec/declaration.dd

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -470,12 +470,17 @@ alias abc = foo.bar; // is it a type or a symbol?
470470
$(P Aliases cannot be used for expressions:)
471471

472472
-----------
473-
struct S { static int i; }
474-
S s;
473+
struct S
474+
{
475+
static int i;
476+
static int j;
477+
}
475478

476-
alias a = s.i; // illegal, s.i is an expression
477-
alias b = S.i; // ok
478-
b = 4; // sets S.i to 4
479+
alias a = S.i; // OK, `S.i` is a symbol
480+
alias b = S.j; // OK. `S.j` is also a symbol
481+
alias c = a + b; // illegal, `a + b` is an expression
482+
a = 2; // sets `S.i` to `2`
483+
b = 4; // sets `S.j` to `4`
479484
-----------
480485

481486
$(H2 $(LNAME2 extern, Extern Declarations))

spec/expression.dd

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1641,9 +1641,9 @@ $(H3 $(LNAME2 assert_expressions, Assert Expressions))
16411641

16421642
$(GRAMMAR
16431643
$(GNAME AssertExpression):
1644-
$(D assert $(LPAREN)) $(GLINK ContractArguments) $(D $(RPAREN))
1644+
$(D assert $(LPAREN)) $(GLINK AssertArguments) $(D $(RPAREN))
16451645

1646-
$(GNAME ContractArguments):
1646+
$(GNAME AssertArguments):
16471647
$(GLINK AssignExpression) $(D ,)$(OPT)
16481648
$(GLINK AssignExpression) $(D ,) $(GLINK AssignExpression) $(D ,)$(OPT)
16491649
)
@@ -1728,18 +1728,20 @@ $(H3 $(LNAME2 mixin_expressions, Mixin Expressions))
17281728

17291729
$(GRAMMAR
17301730
$(GNAME MixinExpression):
1731-
$(D mixin $(LPAREN)) $(GLINK AssignExpression) $(D $(RPAREN))
1731+
$(D mixin $(LPAREN)) $(GLINK ArgumentList) $(D $(RPAREN))
17321732
)
17331733

1734-
$(P The $(I AssignExpression) must evaluate at compile time
1735-
to a constant string.
1734+
$(P Each $(GLINK AssignExpression) in the $(I ArgumentList) is
1735+
evaluated at compile time, and the result must be representable
1736+
as a string.
1737+
The resulting strings are concatenated to form a string.
17361738
The text contents of the string must be compilable as a valid
1737-
$(I Expression), and is compiled as such.)
1739+
$(GLINK Expression), and is compiled as such.)
17381740

17391741
---
17401742
int foo(int x)
17411743
{
1742-
return mixin("x + 1") * 7; // same as ((x + 1) * 7)
1744+
return mixin("x +", 1) * 7; // same as ((x + 1) * 7)
17431745
}
17441746
---
17451747

0 commit comments

Comments
 (0)