Refactoring. Some simplifications in OverloadingConflictResolver.

This commit is contained in:
Stanislav Erokhin
2016-08-23 16:18:17 +03:00
parent 512fb3f191
commit b695f5edd9
3 changed files with 35 additions and 39 deletions
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
* Copyright 2010-2016 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.
@@ -259,4 +259,8 @@ fun ClassDescriptor.getConstructorByParams(params: List<KotlinType>): Constructo
// TODO: inline and remove as soon as all usage sies are converted to kotlin
fun getConstructorByParamsMap(classDescriptor: ClassDescriptor, params: List<Pair<Name, KotlinType>>): ConstructorDescriptor? =
classDescriptor.getConstructorByParams(params.map { it.second })
classDescriptor.getConstructorByParams(params.map { it.second })
fun CallableDescriptor.varargParameterPosition() =
valueParameters.indexOfFirst { it.varargElementType != null }