[svn] r6589: vs-plugin/trunk/Nemerle.Compiler.Utils:
Nemerle.Completion2/CodeModel/XmlDocReader.n Utils.n
VladD2
svnadmin at nemerle.org
Mon Aug 28 17:42:27 CEST 2006
Log:
Fix NullRefException.
Author: VladD2
Date: Mon Aug 28 17:42:22 2006
New Revision: 6589
Modified:
vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/XmlDocReader.n
vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/XmlDocReader.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/XmlDocReader.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Completion2/CodeModel/XmlDocReader.n Mon Aug 28 17:42:22 2006
@@ -4,6 +4,7 @@
using Nemerle.Compiler;
using Nemerle.Completion2.Engine;
+using Nemerle.Compiler.Utils;
namespace Nemerle.Completion2
{
@@ -14,9 +15,9 @@
GetInfo("T:" + mtype.TypeInfo.FullName, location);
}
- public GetInfo(member: IMember, location : Location) : XmlDocInfo
+ public GetInfo(member : IMember, location : Location) : XmlDocInfo
{
- def name = member.DeclaringType.FullName + "." + member.Name;
+ def name = member.GetFullName();
def key = match (member)
{
| _ is IProperty => "P:" + name
Modified: vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n
==============================================================================
--- vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n (original)
+++ vs-plugin/trunk/Nemerle.Compiler.Utils/Utils.n Mon Aug 28 17:42:22 2006
@@ -84,6 +84,19 @@
| _ => " : " + t.ToDisplayString()
}
+ public static GetFullName(this member: IMember) : string
+ {
+ match (member)
+ {
+ | ti is TypeInfo => ti.FullName
+ | _ =>
+ if (member.DeclaringType is null)
+ member.Name
+ else
+ member.DeclaringType.FullName + "." + member.Name
+ }
+ }
+
public static ToDisplayString(this t : TyVar) : string
{
GetNameFromType(t);
More information about the svn
mailing list