Fix error message for inapplicable operator on getValue function

#KT-11739 Fixed
This commit is contained in:
Mikhail Zarechenskiy
2017-07-14 19:35:06 +03:00
parent 7ba073206d
commit 216ab1c6d1
@@ -1,5 +1,5 @@
/*
* Copyright 2010-2015 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.
@@ -103,7 +103,7 @@ private object NoTypeParametersCheck : Check {
}
private object IsKPropertyCheck : Check {
override val description = "second parameter must have a KProperty type or its supertype"
override val description = "second parameter must be of type KProperty<*> or its supertype"
override fun check(functionDescriptor: FunctionDescriptor): Boolean {
val secondParameter = functionDescriptor.valueParameters[1]
return ReflectionTypes.createKPropertyStarType(secondParameter.module)?.isSubtypeOf(secondParameter.type.makeNotNullable()) ?: false