Gradual migration of operator 'mod' to 'rem'
- Introduce new 'rem' operator convention - Prefer 'rem()' to 'mod()' when both are available, even if mod() is a member, and rem() -- an extension - Place operator 'rem' under the language feature
This commit is contained in:
@@ -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.
|
||||
@@ -49,11 +49,13 @@ object OperatorNameConventions {
|
||||
@JvmField val TIMES = Name.identifier("times")
|
||||
@JvmField val DIV = Name.identifier("div")
|
||||
@JvmField val MOD = Name.identifier("mod")
|
||||
@JvmField val REM = Name.identifier("rem")
|
||||
@JvmField val RANGE_TO = Name.identifier("rangeTo")
|
||||
|
||||
@JvmField val TIMES_ASSIGN = Name.identifier("timesAssign")
|
||||
@JvmField val DIV_ASSIGN = Name.identifier("divAssign")
|
||||
@JvmField val MOD_ASSIGN = Name.identifier("modAssign")
|
||||
@JvmField val REM_ASSIGN = Name.identifier("remAssign")
|
||||
@JvmField val PLUS_ASSIGN = Name.identifier("plusAssign")
|
||||
@JvmField val MINUS_ASSIGN = Name.identifier("minusAssign")
|
||||
@JvmField val COROUTINE_HANDLE_RESULT = Name.identifier("handleResult")
|
||||
@@ -72,8 +74,8 @@ object OperatorNameConventions {
|
||||
internal val SIMPLE_UNARY_OPERATION_NAMES = setOf(UNARY_PLUS, UNARY_MINUS, NOT)
|
||||
|
||||
@JvmField
|
||||
internal val BINARY_OPERATION_NAMES = setOf(TIMES, PLUS, MINUS, DIV, MOD, RANGE_TO)
|
||||
internal val BINARY_OPERATION_NAMES = setOf(TIMES, PLUS, MINUS, DIV, MOD, REM, RANGE_TO)
|
||||
|
||||
@JvmField
|
||||
internal val ASSIGNMENT_OPERATIONS = setOf(TIMES_ASSIGN, DIV_ASSIGN, MOD_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN)
|
||||
internal val ASSIGNMENT_OPERATIONS = setOf(TIMES_ASSIGN, DIV_ASSIGN, MOD_ASSIGN, REM_ASSIGN, PLUS_ASSIGN, MINUS_ASSIGN)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user