Skip to content

Commit 5c4c8a4

Browse files
authored
Revert "Update spec for multiple selective imports"
1 parent 5720093 commit 5c4c8a4

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

spec/module.dd

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -178,15 +178,19 @@ $(GNAME ImportDeclaration):
178178

179179
$(GNAME ImportList):
180180
$(I Import)
181+
$(I ImportBindings)
181182
$(I Import) $(D ,) $(I ImportList)
182183

183184
$(GNAME Import):
184185
$(I ModuleFullyQualifiedName)
185186
$(I ModuleAliasIdentifier) $(D =) $(I ModuleFullyQualifiedName)
186-
$(I ImportBindings)
187187

188188
$(GNAME ImportBindings):
189-
$(I Import) $(D :) $(I ImportBind)
189+
$(I Import) $(D :) $(I ImportBindList)
190+
191+
$(GNAME ImportBindList):
192+
$(I ImportBind)
193+
$(I ImportBind) $(D ,) $(I ImportBindList)
190194

191195
$(GNAME ImportBind):
192196
$(I Identifier)
@@ -403,23 +407,6 @@ void main()
403407

404408
$(P $(D static) cannot be used with selective imports.)
405409

406-
$(P Selective `import`s can be made from multiple modules if
407-
all `import`s are selective, or when the imported module has a qualified name:)
408-
409-
$(SPEC_RUNNABLE_EXAMPLE_COMPILE
410-
---
411-
import std.stdio : writeln, writefln, std.file : write, std.ascii;
412-
413-
void main()
414-
{
415-
writeln("hello!"); // ok, writeln from std.stdio
416-
writefln("%s!", "hello"); // ok, writefln from std.stdio
417-
write("world.txt", "hello"); // ok, write from std.file
418-
writeln(digits); // ok, digits from std.ascii
419-
}
420-
---
421-
)
422-
423410
$(H2 $(LNAME2 renamed_selective_imports, Renamed and Selective Imports))
424411

425412
$(P When renaming and selective importing are combined:)

0 commit comments

Comments
 (0)