Browse Source

Fixed bugs introduced in rev 1423.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@1427 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 20 years ago
parent
commit
f6d5658aee
  1. 3
      src/Main/Base/Project/Src/Dom/CecilReader.cs
  2. 6
      src/Main/Base/Project/Src/Dom/Implementations/ProxyReturnType.cs

3
src/Main/Base/Project/Src/Dom/CecilReader.cs

@ -231,7 +231,7 @@ namespace ICSharpCode.SharpDevelop.Dom
if ((nestedType.Attributes & TypeAttributes.NestedPublic) == TypeAttributes.NestedPublic) if ((nestedType.Attributes & TypeAttributes.NestedPublic) == TypeAttributes.NestedPublic)
{ {
// NestedFamily somehow also finds internal inner classes (e.g. Environment.ResourceHelper) // NestedFamily somehow also finds internal inner classes (e.g. Environment.ResourceHelper)
string name = nestedType.FullName; string name = nestedType.Name;
int pos = name.LastIndexOf('/'); int pos = name.LastIndexOf('/');
if (pos > 0) if (pos > 0)
name = name.Substring(pos + 1); name = name.Substring(pos + 1);
@ -239,6 +239,7 @@ namespace ICSharpCode.SharpDevelop.Dom
continue; continue;
if (name.Length > 2 && name[name.Length - 2] == '`') if (name.Length > 2 && name[name.Length - 2] == '`')
name = name.Substring(0, name.Length - 2); name = name.Substring(0, name.Length - 2);
name = this.FullyQualifiedName + "." + name;
InnerClasses.Add(new CecilClass(this.CompilationUnit, this, nestedType, name)); InnerClasses.Add(new CecilClass(this.CompilationUnit, this, nestedType, name));
} }
} }

6
src/Main/Base/Project/Src/Dom/Implementations/ProxyReturnType.cs

@ -148,7 +148,7 @@ namespace ICSharpCode.SharpDevelop.Dom
IReturnType baseType = BaseType; IReturnType baseType = BaseType;
ArrayReturnType temp; ArrayReturnType temp;
if (baseType != null && TryEnter()) if (baseType != null && TryEnter())
temp = CastToArrayReturnType(); temp = baseType.CastToArrayReturnType();
else else
throw new InvalidCastException("Cannot cast " + ToString() + " to expected type."); throw new InvalidCastException("Cannot cast " + ToString() + " to expected type.");
busy = false; busy = false;
@ -168,7 +168,7 @@ namespace ICSharpCode.SharpDevelop.Dom
IReturnType baseType = BaseType; IReturnType baseType = BaseType;
GenericReturnType temp; GenericReturnType temp;
if (baseType != null && TryEnter()) if (baseType != null && TryEnter())
temp = CastToGenericReturnType(); temp = baseType.CastToGenericReturnType();
else else
throw new InvalidCastException("Cannot cast " + ToString() + " to expected type."); throw new InvalidCastException("Cannot cast " + ToString() + " to expected type.");
busy = false; busy = false;
@ -188,7 +188,7 @@ namespace ICSharpCode.SharpDevelop.Dom
IReturnType baseType = BaseType; IReturnType baseType = BaseType;
ConstructedReturnType temp; ConstructedReturnType temp;
if (baseType != null && TryEnter()) if (baseType != null && TryEnter())
temp = CastToConstructedReturnType(); temp = baseType.CastToConstructedReturnType();
else else
throw new InvalidCastException("Cannot cast " + ToString() + " to expected type."); throw new InvalidCastException("Cannot cast " + ToString() + " to expected type.");
busy = false; busy = false;

Loading…
Cancel
Save