aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/dmd/dsymbol.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d/dmd/dsymbol.d')
-rw-r--r--gcc/d/dmd/dsymbol.d28
1 files changed, 27 insertions, 1 deletions
diff --git a/gcc/d/dmd/dsymbol.d b/gcc/d/dmd/dsymbol.d
index 74eaa1d..b006940 100644
--- a/gcc/d/dmd/dsymbol.d
+++ b/gcc/d/dmd/dsymbol.d
@@ -984,7 +984,7 @@ extern (C++) class Dsymbol : ASTNode
*/
uinteger_t size(const ref Loc loc)
{
- error("Dsymbol `%s` has no size", toChars());
+ error("symbol `%s` has no size", toChars());
return SIZE_INVALID;
}
@@ -1641,6 +1641,32 @@ public:
}
}
+
+ /*****************************************
+ * Returns: the symbols whose members have been imported, i.e. imported modules
+ * and template mixins.
+ *
+ * See_Also: importScope
+ */
+ extern (D) final Dsymbols* getImportedScopes() nothrow @nogc @safe pure
+ {
+ return importedScopes;
+ }
+
+ /*****************************************
+ * Returns: the array of visibilities associated with each imported scope. The
+ * length of the array matches the imported scopes array.
+ *
+ * See_Also: getImportedScopes
+ */
+ extern (D) final Visibility.Kind[] getImportVisibilities() nothrow @nogc @safe pure
+ {
+ if (!importedScopes)
+ return null;
+
+ return (() @trusted => visibilities[0 .. importedScopes.dim])();
+ }
+
extern (D) final void addAccessiblePackage(Package p, Visibility visibility) nothrow
{
auto pary = visibility.kind == Visibility.Kind.private_ ? &privateAccessiblePackages : &accessiblePackages;