Temporarily revert "kill JavaNamespaceDescriptor"
This reverts commit 3c45a1d60e.
This commit breaks compilation of jdk-headers. Explanation:
1. TopDownAnalyzer creates namespace java.util from sources
2. TopDownAnalyzer creates class Map in java.util
3. TopDownAnalyzer processes import java.util.Map.Entry
4. JavaDescriptorResolver resolves namespace java.util.Map
5. java.util.Map namespace is added to java.util namespace
6. redeclaration handler of namespace java.util crashes on Map
This commit is contained in:
@@ -218,11 +218,7 @@ public class JetTypeMapper {
|
||||
*
|
||||
* @see DescriptorUtils#getFQName(DeclarationDescriptor)
|
||||
*/
|
||||
public String getFQName(@NotNull DeclarationDescriptor descriptor) {
|
||||
if (descriptor instanceof ModuleDescriptor) {
|
||||
throw new IllegalStateException("missed something");
|
||||
}
|
||||
|
||||
public String getFQName(DeclarationDescriptor descriptor) {
|
||||
descriptor = descriptor.getOriginal();
|
||||
|
||||
if(descriptor instanceof FunctionDescriptor) {
|
||||
@@ -237,8 +233,11 @@ public class JetTypeMapper {
|
||||
if(name.contains("/"))
|
||||
return name;
|
||||
if (container != null) {
|
||||
if (container.getContainingDeclaration() instanceof ModuleDescriptor) {
|
||||
return name;
|
||||
}
|
||||
if (container instanceof ModuleDescriptor) {
|
||||
return "";
|
||||
throw new IllegalStateException("missed something");
|
||||
}
|
||||
String baseName = getFQName(container);
|
||||
if (!baseName.isEmpty()) {
|
||||
|
||||
Reference in New Issue
Block a user