COMMA_IN_WHEN_CONDITION_WITHOUT_ARGUMENT is an ERROR now.

Migrated code.
Updated test data in IDE tests.
Dropped whenWithRangeTestsAndMultiConditions.kt:
"Introduce subject" is not applicable to 'when' with ||-ed conditions.
This commit is contained in:
Dmitry Petrov
2015-12-10 12:12:44 +03:00
parent 199827635f
commit 0fe74a8b43
26 changed files with 36 additions and 58 deletions
@@ -56,7 +56,7 @@ tailrec fun allSuperTypesImpl(roots: List<GenerateTraitOrClass>, all: Map<String
fun standardTypes() = typeMapper.values.map {it.dropNullable()}.toSet()
fun Type.dynamicIfUnknownType(allTypes: Set<String>, standardTypes: Set<Type> = standardTypes()): Type = when {
this is DynamicType, this is UnitType -> this
this is DynamicType || this is UnitType -> this
this is SimpleType && this.type in allTypes -> this
this.dropNullable() in standardTypes -> this