return texpr;
}
- // TODO: REMOVE me
- public ATypeNameExpression MakeTypeNameExpression (Location loc)
- {
- string[] names = Name.Split (new[] { '.' });
-
- ATypeNameExpression exp = null;
- for (var i = 0; i < names.Length; i++) {
- var name = names[i];
- if (exp == null) {
- exp = new SimpleName (name, loc);
- } else {
- exp = new MemberAccess (exp, name, loc);
- }
- }
-
- return exp;
- }
-
//
// Completes types with the given `prefix'
//
get {
return clauses;
}
- protected set {
- clauses = value;
- }
}
public override string[] ValidAttributeTargets {
#endregion
- public void AddUsing (UsingNamespace un, bool forceAppend = false) // TODO: remove the change
+ public void AddUsing (UsingNamespace un)
{
if (DeclarationFound){
Compiler.Report.Error (1529, un.Location, "A using clause must precede all other namespace elements except extern alias declarations");
public override void AddTypeContainer (TypeContainer tc)
{
string name = tc.Basename;
- if (name == null) {
- containers.Add (tc);
- return;
- }
var mn = tc.MemberName;
while (mn.Left != null) {
MemberCore mc;
if (names_container.DefinedNames.TryGetValue (name, out mc)) {
if (tc is NamespaceContainer && mc is NamespaceContainer) {
- containers.Add (tc);
+ AddTypeContainerMember (tc);
return;
}
public override void GetCompletionStartingWith (string prefix, List<string> results)
{
+ if (Usings == null)
+ return;
+
foreach (var un in Usings) {
if (un.Alias != null)
continue;
if (aliases != null && arity == 0) {
UsingAliasNamespace uan;
if (aliases.TryGetValue (name, out uan)) {
- if (fne != null) {
+ if (fne != null && mode != LookupMode.Probing) {
// TODO: Namespace has broken location
//Report.SymbolRelatedToPreviousError (fne.Location, null);
Compiler.Report.SymbolRelatedToPreviousError (uan.Location, null);