File tree Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Expand file tree Collapse file tree 2 files changed +32
-2
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ $(GNAME FunctionAttributeKwd):
39
39
40
40
$(GNAME AtAttribute):
41
41
$(D @) $(RELATIVE_LINK2 disable, $(D disable))
42
+ $(D @) $(RELATIVE_LINK2 future, $(D __future))
42
43
$(D @) $(RELATIVE_LINK2 nogc, $(D nogc))
43
44
$(D @) $(DDLINK spec/ob, Live Functions, `live`)
44
45
$(GLINK Property)
@@ -402,6 +403,34 @@ $(GNAME DeprecatedAttribute):
402
403
)
403
404
404
405
406
+ $(H2 $(LNAME2 future, `@__future` attribute))
407
+
408
+ $(P The `@__future` attribute is used to mark a new symbol which could
409
+ cause a name clash in another module. The other module using a symbol with the
410
+ same name will continue to compile as before but will show a deprecation message.
411
+ The message indicates that the new symbol will break the existing code in future,
412
+ and the other module should be updated.
413
+ )
414
+
415
+ $(NOTE Currently only methods that implicitly override a `@__future` base class
416
+ method show a deprecation message.)
417
+
418
+ $(P See $(LINK2 https://github.com/dlang/DIPs/blob/master/DIPs/accepted/DIP1007.md,
419
+ DIP1007) for details.)
420
+
421
+ $(COMMENT
422
+ ---
423
+ module a;
424
+ @__future int i;
425
+
426
+ module b;
427
+ import a;
428
+ import c : i;
429
+ enum e = i; // Deprecation: `c.i` will conflict with `@__future` symbol `a.i`
430
+ ---
431
+ )
432
+
433
+
405
434
$(H2 $(LNAME2 visibility_attributes, Visibility Attributes))
406
435
407
436
$(GRAMMAR
Original file line number Diff line number Diff line change @@ -1185,8 +1185,9 @@ $(H3 $(GNAME isNested))
1185
1185
$(H3 $(GNAME isFuture))
1186
1186
1187
1187
$(P Takes one argument. It returns `true` if the argument is a symbol
1188
- marked with the `@future` keyword, otherwise `false`. Currently, only
1189
- functions and variable declarations have support for the `@future` keyword.)
1188
+ marked with the $(DDSUBLINK spec/attribute, future, `@__future` attribute),
1189
+ otherwise `false`. Currently, only
1190
+ functions and variable declarations have support for the `@__future` keyword.)
1190
1191
1191
1192
$(H3 $(GNAME isDeprecated))
1192
1193
You can’t perform that action at this time.
0 commit comments