Partially revert "Fix project source to overcome bootstrap problem"

Adjust code to new generic signatures generated by Kotlin compiler
This reverts commit 0fd2484bc9.
This commit is contained in:
Denis Zharkov
2015-12-03 15:19:21 +03:00
parent a19708693b
commit 9c73502bdc
11 changed files with 29 additions and 29 deletions
@@ -90,7 +90,7 @@ public class CallBasedArgumentGenerator extends ArgumentGenerator {
}
@Override
protected void reorderArgumentsIfNeeded(@NotNull List actualArgsWithDeclIndex) {
protected void reorderArgumentsIfNeeded(@NotNull List<ArgumentAndDeclIndex> actualArgsWithDeclIndex) {
callGenerator.reorderArgumentsIfNeeded(actualArgsWithDeclIndex, valueParameterTypes);
}
}
@@ -1559,7 +1559,7 @@ public class ImplementationBodyCodegen extends ClassBodyCodegen {
}
@Override
protected void reorderArgumentsIfNeeded(@NotNull List args) {
protected void reorderArgumentsIfNeeded(@NotNull List<ArgumentAndDeclIndex> args) {
}
}
@@ -778,7 +778,7 @@ public class InlineCodegen extends CallGenerator {
@Override
public void reorderArgumentsIfNeeded(
@NotNull List actualArgsWithDeclIndex, @NotNull List valueParameterTypes
@NotNull List<ArgumentAndDeclIndex> actualArgsWithDeclIndex, @NotNull List<? extends Type> valueParameterTypes
) {
}
@@ -157,7 +157,7 @@ public class TabledDescriptorRenderer {
@NotNull
public Renderer<KotlinType> getTypeRenderer() {
return (Renderer<KotlinType>) Renderers.RENDER_TYPE;
return Renderers.RENDER_TYPE;
}
protected void renderText(TextRenderer textRenderer, StringBuilder result) {
@@ -160,8 +160,8 @@ public class ResolveSession implements KotlinCodeAnalyzer, LazyClassContext {
@NotNull
@Override
public Collection getSubPackagesOf(
@NotNull FqName fqName, @NotNull Function1 nameFilter
public Collection<FqName> getSubPackagesOf(
@NotNull FqName fqName, @NotNull Function1<? super Name, Boolean> nameFilter
) {
LazyPackageDescriptor packageDescriptor = getPackageFragment(fqName);
if (packageDescriptor == null) {
@@ -262,9 +262,9 @@ public class EnumEntrySyntheticClassDescriptor extends ClassDescriptorBase {
@NotNull
@Override
public Collection getContributedDescriptors(
public Collection<DeclarationDescriptor> getContributedDescriptors(
@NotNull DescriptorKindFilter kindFilter,
@NotNull Function1 nameFilter
@NotNull Function1<? super Name, Boolean> nameFilter
) {
return allDescriptors.invoke();
}
@@ -77,8 +77,8 @@ public class ErrorUtils {
@NotNull
@Override
public Collection getSubPackagesOf(
@NotNull FqName fqName, @NotNull Function1 nameFilter
public Collection<FqName> getSubPackagesOf(
@NotNull FqName fqName, @NotNull Function1<? super Name, Boolean> nameFilter
) {
return emptyList();
}
@@ -188,8 +188,8 @@ public class ErrorUtils {
@NotNull
@Override
public Collection getContributedDescriptors(
@NotNull DescriptorKindFilter kindFilter, @NotNull Function1 nameFilter
public Collection<DeclarationDescriptor> getContributedDescriptors(
@NotNull DescriptorKindFilter kindFilter, @NotNull Function1<? super Name, Boolean> nameFilter
) {
return Collections.emptyList();
}
@@ -233,8 +233,8 @@ public class ErrorUtils {
@NotNull
@Override
public Collection getContributedDescriptors(
@NotNull DescriptorKindFilter kindFilter, @NotNull Function1 nameFilter
public Collection<DeclarationDescriptor> getContributedDescriptors(
@NotNull DescriptorKindFilter kindFilter, @NotNull Function1<? super Name, Boolean> nameFilter
) {
throw new IllegalStateException();
}
@@ -151,15 +151,15 @@ public class LockBasedStorageManager implements StorageManager {
@NotNull
@Override
public NotNullLazyValue createLazyValueWithPostCompute(
@NotNull Function0 computable,
final Function1 onRecursiveCall,
@NotNull final Function1 postCompute
public <T> NotNullLazyValue<T> createLazyValueWithPostCompute(
@NotNull Function0<? extends T> computable,
final Function1<? super Boolean, ? extends T> onRecursiveCall,
@NotNull final Function1<? super T, Unit> postCompute
) {
return new LockBasedNotNullLazyValue(computable) {
return new LockBasedNotNullLazyValue<T>(computable) {
@NotNull
@Override
protected RecursionDetectedResult recursionDetected(boolean firstTime) {
protected RecursionDetectedResult<T> recursionDetected(boolean firstTime) {
if (onRecursiveCall == null) {
return super.recursionDetected(firstTime);
}
@@ -167,7 +167,7 @@ public class LockBasedStorageManager implements StorageManager {
}
@Override
protected void postCompute(@NotNull Object value) {
protected void postCompute(@NotNull T value) {
postCompute.invoke(value);
}
};
@@ -193,12 +193,12 @@ public class LockBasedStorageManager implements StorageManager {
@NotNull
@Override
public NullableLazyValue createNullableLazyValueWithPostCompute(
@NotNull Function0 computable, @NotNull final Function1 postCompute
public <T> NullableLazyValue<T> createNullableLazyValueWithPostCompute(
@NotNull Function0<? extends T> computable, @NotNull final Function1<? super T, Unit> postCompute
) {
return new LockBasedLazyValue(computable) {
return new LockBasedLazyValue<T>(computable) {
@Override
protected void postCompute(@Nullable Object value) {
protected void postCompute(@Nullable T value) {
postCompute.invoke(value);
}
};
@@ -44,7 +44,7 @@ public class HtmlTabledDescriptorRenderer extends TabledDescriptorRenderer {
@NotNull
@Override
public Renderer<KotlinType> getTypeRenderer() {
return (Renderer<KotlinType>) IdeRenderers.HTML_RENDER_TYPE;
return IdeRenderers.HTML_RENDER_TYPE;
}
@Override
@@ -197,12 +197,12 @@ public class KotlinBytecodeToolWindow extends JPanel implements Disposable {
BindingContext bindingContextForFile = resolutionFacade.analyzeFullyAndGetResult(Collections.singletonList(jetFile)).getBindingContext();
kotlin.Pair<BindingContext, List<KtFile>> result = (kotlin.Pair) DebuggerUtils.INSTANCE.analyzeInlinedFunctions(
kotlin.Pair<BindingContext, List<KtFile>> result = DebuggerUtils.INSTANCE.analyzeInlinedFunctions(
resolutionFacade, bindingContextForFile, jetFile, !enableInline
);
BindingContext bindingContext = result.getFirst();
List<? extends KtFile> toProcess = result.getSecond();
List<KtFile> toProcess = result.getSecond();
GenerationState.GenerateClassFilter generateClassFilter = new GenerationState.GenerateClassFilter() {
@@ -390,7 +390,7 @@ public class MoveKotlinTopLevelDeclarationsDialog extends RefactoringDialog {
}
private boolean isFullFileMove() {
Map<KtFile, List<KtNamedDeclaration>> fileToElements = (Map) CollectionsKt.groupBy(
Map<KtFile, List<KtNamedDeclaration>> fileToElements = CollectionsKt.groupBy(
getSelectedElementsToMove(),
new Function1<KtNamedDeclaration, KtFile>() {
@Override