Skip to content

Commit 83e4274

Browse files
committed
Stop treating TKIND_ALIAS as an interface. Closes #2538
1 parent f0f4183 commit 83e4274

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Rubberduck.Parsing/ComReflection/ComProject.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,6 @@ private void LoadModules(ITypeLib typeLibrary)
119119
_classes.Add(coclass as ComCoClass);
120120
if (type != null) KnownTypes.TryAdd(typeAttributes.guid, coclass);
121121
break;
122-
case TYPEKIND.TKIND_ALIAS:
123-
//The current handling of this is wrong - these don't have to be classes or interfaces. In the VBE module for example,
124-
//"LongPtr" is defined as an alias to "Long" (at least on a 32 bit system) - RD is currently treating is like a class.
125-
//Unclear if these can *also* define alternative names for interfaces as well, but all the ones I've seen have been basically
126-
//a C typedef. So... this needs work. Don't make any assumptions about these elsewhere in the code until this is nailed down.
127122
case TYPEKIND.TKIND_DISPATCH:
128123
case TYPEKIND.TKIND_INTERFACE:
129124
var intface = type ?? new ComInterface(typeLibrary, info, typeAttributes, index);
@@ -139,6 +134,8 @@ private void LoadModules(ITypeLib typeLibrary)
139134
_modules.Add(module as ComModule);
140135
if (type != null) KnownTypes.TryAdd(typeAttributes.guid, module);
141136
break;
137+
case TYPEKIND.TKIND_ALIAS:
138+
//TKIND_ALIAS does not appear to be a supported member type in VBA.
142139
case TYPEKIND.TKIND_UNION:
143140
//TKIND_UNION is not a supported member type in VBA.
144141
break;

0 commit comments

Comments
 (0)