Skip to content

Commit ca722a7

Browse files
committed
Apparently we *do* care about TKIND_ALIAS, and everything is procedural (for now)...
1 parent 3586a84 commit ca722a7

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

Rubberduck.Parsing/ComReflection/ComModule.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,16 @@ public IEnumerable<ComField> Fields
2626
}
2727

2828
public ComModule(ITypeLib typeLib, ITypeInfo info, TYPEATTR attrib, int index) : base(typeLib, attrib, index)
29-
{
29+
{
30+
Type = DeclarationType.ProceduralModule;
3031
if (attrib.cFuncs > 0)
3132
{
3233
Debug.Assert(attrib.cVars == 0);
33-
Type = DeclarationType.ProceduralModule;
3434
GetComMembers(info, attrib);
3535
}
3636
else
3737
{
3838
Debug.Assert(attrib.cVars > 0);
39-
Type = DeclarationType.Module;
4039
GetComFields(info, attrib);
4140
}
4241
}

Rubberduck.Parsing/ComReflection/ComProject.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ private void LoadModules(ITypeLib typeLibrary)
109109
var coclass = type ?? new ComCoClass(typeLibrary, info, typeAttributes, index);
110110
_classes.Add(coclass as ComCoClass);
111111
if (type != null) KnownTypes.TryAdd(typeAttributes.guid, coclass);
112-
break;
112+
break;
113+
case TYPEKIND.TKIND_ALIAS:
113114
case TYPEKIND.TKIND_DISPATCH:
114115
case TYPEKIND.TKIND_INTERFACE:
115116
var intface = type ?? new ComInterface(typeLibrary, info, typeAttributes, index);
@@ -124,9 +125,6 @@ private void LoadModules(ITypeLib typeLibrary)
124125
_modules.Add(module as ComModule);
125126
if (type != null) KnownTypes.TryAdd(typeAttributes.guid, module);
126127
break;
127-
case TYPEKIND.TKIND_ALIAS:
128-
//Haven't seen one of these either.
129-
throw new NotImplementedException(string.Format("Didn't expect to find a TKIND_ALIAS in {0}.", Path));
130128
default:
131129
throw new NotImplementedException(string.Format("Didn't expect a TYPEATTR with multiple typekind flags set in {0}.", Path));
132130
}

0 commit comments

Comments
 (0)