[NI] Check for unwrapped descriptor when generating accessible function
In new inference we get copy of sam constructor and therefore should check original descriptor in BE. This fixes 'protectedSamConstructor' test
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2016 JetBrains s.r.o.
|
||||
* Copyright 2010-2017 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -574,7 +574,7 @@ public abstract class CodegenContext<T extends DeclarationDescriptor> {
|
||||
|
||||
if (descriptorContext == null &&
|
||||
JavaVisibilities.PROTECTED_STATIC_VISIBILITY == descriptor.getVisibility() &&
|
||||
!(descriptor instanceof SamConstructorDescriptor)) {
|
||||
(!(descriptor.getOriginal() instanceof SamConstructorDescriptor))) {
|
||||
//seems we need static receiver in resolved call
|
||||
descriptorContext = ExpressionCodegen.getParentContextSubclassOf((ClassDescriptor) enclosed, this);
|
||||
superCallTarget = (ClassDescriptor) enclosed;
|
||||
|
||||
Reference in New Issue
Block a user