File tree Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Expand file tree Collapse file tree 1 file changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -178,19 +178,15 @@ $(GNAME ImportDeclaration):
178
178
179
179
$(GNAME ImportList):
180
180
$(I Import)
181
- $(I ImportBindings)
182
181
$(I Import) $(D ,) $(I ImportList)
183
182
184
183
$(GNAME Import):
185
184
$(I ModuleFullyQualifiedName)
186
185
$(I ModuleAliasIdentifier) $(D =) $(I ModuleFullyQualifiedName)
186
+ $(I ImportBindings)
187
187
188
188
$(GNAME ImportBindings):
189
- $(I Import) $(D :) $(I ImportBindList)
190
-
191
- $(GNAME ImportBindList):
192
- $(I ImportBind)
193
- $(I ImportBind) $(D ,) $(I ImportBindList)
189
+ $(I Import) $(D :) $(I ImportBind)
194
190
195
191
$(GNAME ImportBind):
196
192
$(I Identifier)
@@ -407,6 +403,22 @@ void main()
407
403
408
404
$(P $(D static) cannot be used with selective imports.)
409
405
406
+ $(P Selective imports can be imported from multiple modules if
407
+ those import are also selective or when the imported module has a qualified name:)
408
+
409
+ $(SPEC_RUNNABLE_EXAMPLE_COMPILE
410
+ ---
411
+ import std.stdio : writeln, std.file : write, std.ascii;
412
+
413
+ void main()
414
+ {
415
+ writeln("hello!"); // ok, writeln from std.stdio
416
+ write("world.txt", "hello"); // ok, write from std.file
417
+ writeln(digits); // ok, digits from std.ascii
418
+ }
419
+ ---
420
+ )
421
+
410
422
$(H2 $(LNAME2 renamed_selective_imports, Renamed and Selective Imports))
411
423
412
424
$(P When renaming and selective importing are combined:)
You can’t perform that action at this time.
0 commit comments