Merge remote branch 'origin/master'
This commit is contained in:
@@ -68,6 +68,18 @@ public class AnalyzerFacade {
|
||||
throw e;
|
||||
}
|
||||
catch (Throwable e) {
|
||||
// This is needed for the Web Demo server to log the exceptions coming from the analyzer instead of showing them in the editor.
|
||||
if (System.getProperty("kotlin.running.in.server.mode", "false").equals("true")) {
|
||||
if (e instanceof RuntimeException) {
|
||||
RuntimeException runtimeException = (RuntimeException) e;
|
||||
throw runtimeException;
|
||||
}
|
||||
if (e instanceof Error) {
|
||||
Error error = (Error) e;
|
||||
throw error;
|
||||
}
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
e.printStackTrace();
|
||||
BindingTraceContext bindingTraceContext = new BindingTraceContext();
|
||||
bindingTraceContext.report(Errors.EXCEPTION_WHILE_ANALYZING.on(file, e));
|
||||
|
||||
@@ -286,8 +286,11 @@ public class TypeResolver {
|
||||
private JetScope resolveClassLookupScope(JetScope scope, JetUserType userType) {
|
||||
ClassifierDescriptor classifierDescriptor = resolveClassWithoutErrorReporting(scope, userType);
|
||||
if (classifierDescriptor instanceof ClassDescriptor) {
|
||||
List<TypeProjection> typeArguments = resolveTypeProjections(scope, classifierDescriptor.getTypeConstructor(), userType.getTypeArguments());
|
||||
return ((ClassDescriptor) classifierDescriptor).getMemberScope(typeArguments);
|
||||
ClassDescriptor classDescriptor = (ClassDescriptor) classifierDescriptor;
|
||||
JetType classObjectType = classDescriptor.getClassObjectType();
|
||||
if (classObjectType != null) {
|
||||
return classObjectType.getMemberScope();
|
||||
}
|
||||
}
|
||||
|
||||
NamespaceDescriptor namespaceDescriptor = resolveNamespace(scope, userType);
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// http://youtrack.jetbrains.net/issue/KT-526
|
||||
// KT-526 Unresolved reference for inner static class
|
||||
|
||||
namespace demo
|
||||
|
||||
class Foo {
|
||||
class object {
|
||||
class Bar() { }
|
||||
}
|
||||
}
|
||||
class User {
|
||||
fun main() : Unit {
|
||||
var boo : Foo.Bar? /* <-- this reference is red */ = Foo.Bar()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user