Community
Participate
Working Groups
I20051130-1215 ITypeBinding#getKey() is not stable for a local type after unrelated modifications. Currently, the key is based on a source code offset, which changes with the slightest code modification at a position before the type declaration. This is not in line with the spec of IBinding#getKey(): [..] - local types - the name of the type, the index of the declaring block relative to its parent, the key of its method - anonymous types - the occurence count of the anonymous type relative to its declaring type, the key of its declaring type [..] We first thought this would be a problem for us, but we found out that we can't use the key anyway for the concrete scenario we're working on. Nevertheless, it would be better to use the occurrence count and not the offet to identify a local type.