Deprecate with error mixed Int/FP contains operator for ranges KT-22423

This commit is contained in:
Abduqodiri Qurbonzoda
2020-06-23 07:08:18 +03:00
parent ab20b3e083
commit d3fb9cc5f3
22 changed files with 1712 additions and 5903 deletions
@@ -159,7 +159,7 @@ object RangeOps : TemplateGroupBase() {
check(rangeType.isNumeric() == itemType.isNumeric()) { "Required rangeType and itemType both to be numeric or both not, got: $rangeType, $itemType" }
if (rangeType.isIntegral() != itemType.isIntegral()) {
deprecate(Deprecation("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.WARNING))
deprecate(Deprecation("This `contains` operation mixing integer and floating point arguments has ambiguous semantics and is going to be removed.", level = DeprecationLevel.ERROR))
}
platformName("${rangeType.name.decapitalize()}RangeContains")