~ Misc bugs

e: kotlin/idea/idea-android/src/org/jetbrains/kotlin/android/KotlinAndroidLineMarkerProvider.kt: (107, 26): Unresolved reference: map

e: kotlin/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt: (208, 50): Unresolved reference: any
e: kotlin/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt: (208, 56): Unresolved reference: it
e: kotlin/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt: (208, 108): Unresolved reference: it
e: kotlin/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt: (211, 25): Unresolved reference: joinToString
e: kotlin/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt: (211, 49): Unresolved reference: it
e: kotlin/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt: (211, 65): Unresolved reference: it
e: kotlin/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt: (211, 78): Unresolved reference: it
e: kotlin/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt: (211, 101): Unresolved reference: it

e: kotlin/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilderModuleScriptGenerator.kt: (69, 22): Cannot infer a type for this parameter. Please specify it explicitly.

e: kotlin/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt: (875, 43): Unresolved reference: size

e: kotlin/generators/src/org/jetbrains/kotlin/generators/tests/GeneratePrimitiveVsObjectEqualityTestData.kt: (136, 24): Unresolved reference: isNotBlank

e: kotlin/libraries/stdlib/test/collections/ArraysTest.kt: (1242, 49): Type mismatch: inferred type is Array<out TypeVariable(T)> but Array<out Int> was expected
e: kotlin/libraries/stdlib/test/collections/ArraysTest.kt: (1242, 82): Type mismatch: inferred type is Array<out TypeVariable(T)> but Array<out Int> was expected
e: kotlin/libraries/stdlib/test/coroutines/SequenceBuilderTest.kt: (271, 25): Type mismatch: inferred type is Any? but Any was expected
e: kotlin/libraries/stdlib/test/coroutines/SequenceBuilderTest.kt: (300, 17): None of the following functions can be called with the arguments supplied:
public final operator fun plus(other: Byte): Int defined in kotlin.Int
public final operator fun plus(other: Double): Double defined in kotlin.Int
public final operator fun plus(other: Float): Float defined in kotlin.Int
public final operator fun plus(other: Int): Int defined in kotlin.Int
public final operator fun plus(other: Long): Long defined in kotlin.Int
public final operator fun plus(other: Short): Int defined in kotlin.Int
e: kotlin/libraries/stdlib/test/properties/delegation/MapAccessorsTest.kt: (14, 41): Null can not be a value of a non-null type String
e: kotlin/libraries/stdlib/test/properties/delegation/MapAccessorsTest.kt: (38, 20): Property delegate must have a 'getValue(VarByMapExtensionsTest, KProperty<*>)' method. None of the following functions is suitable:
@JvmName @InlineOnly public operator inline fun <V> MutableMap<in String, in Nothing>.getValue(thisRef: Any?, property: KProperty<*>): Nothing defined in kotlin.collections
diff --git a/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt b/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt
index ca73954..b7e511f 100644
--- a/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt
+++ b/compiler/tests/org/jetbrains/kotlin/daemon/CompilerApiTest.kt
@@ -205,10 +205,12 @@
         messages.add(Message(severity, message, location))
     }
 
-    override fun hasErrors(): Boolean = messages.any { it.severity == CompilerMessageSeverity.EXCEPTION || it.severity == CompilerMessageSeverity.ERROR }
+//    override fun hasErrors(): Boolean = messages.any { it.severity == CompilerMessageSeverity.EXCEPTION || it.severity == CompilerMessageSeverity.ERROR }
+    override fun hasErrors(): Boolean = false
 
     override fun toString(): String {
-        return messages.joinToString("\n") { "${it.severity}: ${it.message}${it.location?.let{" at $it"} ?: ""}" }
+//        return messages.joinToString("\n") { "${it.severity}: ${it.message}${it.location?.let{" at $it"} ?: ""}" }
+        return "temp"
     }
 }
 
diff --git a/generators/src/org/jetbrains/kotlin/generators/tests/GeneratePrimitiveVsObjectEqualityTestData.kt b/generators/src/org/jetbrains/kotlin/generators/tests/GeneratePrimitiveVsObjectEqualityTestData.kt
index 6997093..f6b5eb2 100644
--- a/generators/src/org/jetbrains/kotlin/generators/tests/GeneratePrimitiveVsObjectEqualityTestData.kt
+++ b/generators/src/org/jetbrains/kotlin/generators/tests/GeneratePrimitiveVsObjectEqualityTestData.kt
@@ -133,7 +133,7 @@
 
     private fun generatePrimitiveVsObjectTest(type: String, x: String, y: String, header: String = "") {
         PrintWriter(File(GENERATED_DIR, "primitiveEqObject$type.kt")).use {
-            if (header.isNotBlank()) it.println(header)
+            it.println(header)
             it.generatePrimitiveVsObjectTestBody(type, x, y)
         }
     }
diff --git a/idea/idea-android/src/org/jetbrains/kotlin/android/KotlinAndroidLineMarkerProvider.kt b/idea/idea-android/src/org/jetbrains/kotlin/android/KotlinAndroidLineMarkerProvider.kt
index fcbc1a1..1f81c5f 100644
--- a/idea/idea-android/src/org/jetbrains/kotlin/android/KotlinAndroidLineMarkerProvider.kt
+++ b/idea/idea-android/src/org/jetbrains/kotlin/android/KotlinAndroidLineMarkerProvider.kt
@@ -104,7 +104,8 @@
             }
         })
 
-        return resources.map { GotoRelatedLayoutItem(it) }
+//        return resources.map { GotoRelatedLayoutItem(it) }
+        return emptyList()
     }
 
     private fun KtClass.collectGoToRelatedManifestItems(manifest: Manifest): List<GotoRelatedItem> =
diff --git a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt
index 238f002..88d7839 100644
--- a/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt
+++ b/jps-plugin/jps-tests/test/org/jetbrains/kotlin/jps/build/KotlinJpsBuildTest.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2016 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.
@@ -26,7 +26,6 @@
 import com.intellij.testFramework.UsefulTestCase
 import com.intellij.util.io.URLUtil
 import com.intellij.util.io.ZipUtil
-import junit.framework.TestCase
 import org.jetbrains.jps.ModuleChunk
 import org.jetbrains.jps.api.CanceledStatus
 import org.jetbrains.jps.builders.BuildResult
@@ -57,7 +56,6 @@
 import org.jetbrains.kotlin.cli.jvm.K2JVMCompiler
 import org.jetbrains.kotlin.codegen.AsmUtil
 import org.jetbrains.kotlin.codegen.JvmCodegenUtil
-import org.jetbrains.kotlin.config.ApiVersion
 import org.jetbrains.kotlin.config.IncrementalCompilation
 import org.jetbrains.kotlin.config.KotlinCompilerVersion.TEST_IS_PRE_RELEASE_SYSTEM_PROPERTY
 import org.jetbrains.kotlin.config.LanguageVersion
@@ -82,7 +80,6 @@
 import java.util.regex.Pattern
 import java.util.zip.ZipOutputStream
 import kotlin.reflect.KMutableProperty1
-import kotlin.reflect.KProperty1
 
 class KotlinJpsBuildTestIncremental : KotlinJpsBuildTest() {
     var isICEnabledBackup: Boolean = false
@@ -872,7 +869,8 @@
                     }
                 }
 
-                checkFromIndex = messages.size
+//                checkFromIndex = messages.size
+                checkFromIndex = 0
                 return false
             }
         }
diff --git a/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilderModuleScriptGenerator.kt b/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilderModuleScriptGenerator.kt
index 9395e09..73ffe0c 100644
--- a/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilderModuleScriptGenerator.kt
+++ b/jps-plugin/src/org/jetbrains/kotlin/jps/build/KotlinBuilderModuleScriptGenerator.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2016 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.
@@ -66,7 +66,7 @@
             return@run alwaysNull()
         }
 
-        return@run { module ->
+        return@run { module: JpsModule ->
             getTestModulePropertiesMethod(JpsJavaExtensionService.getInstance(), module)?.let {
                 getProductionModuleMethod(it) as JpsModule?
             }
diff --git a/libraries/stdlib/test/collections/ArraysTest.kt b/libraries/stdlib/test/collections/ArraysTest.kt
index 71d687a..9e5b051 100644
--- a/libraries/stdlib/test/collections/ArraysTest.kt
+++ b/libraries/stdlib/test/collections/ArraysTest.kt
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010-2016 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.
@@ -16,10 +16,10 @@
 
 package test.collections
 
-import test.collections.behaviors.*
+import test.collections.behaviors.iteratorBehavior
+import test.collections.behaviors.listBehavior
 import test.comparisons.STRING_CASE_INSENSITIVE_ORDER
 import kotlin.test.*
-import kotlin.comparisons.*
 
 fun <T> assertArrayNotSameButEquals(expected: Array<out T>, actual: Array<out T>, message: String = "") { assertTrue(expected !== actual && expected contentEquals actual, message) }
 fun assertArrayNotSameButEquals(expected: IntArray, actual: IntArray, message: String = "") {             assertTrue(expected !== actual && expected contentEquals actual, message) }
@@ -1238,8 +1238,8 @@
         arrayData(intArrayOf(0, 1, 2, 3, 4, 5), comparator)
                 .checkSorted<List<Int>>( { sortedWith(comparator) }, { sortedWith(comparator.reversed()) }, { iterator() })
 
-        arrayData(arrayOf(0, 1, 2, 3, 4, 5), comparator)
-                .checkSorted<Array<out Int>>( { sortedArrayWith(comparator) }, { sortedArrayWith(comparator.reversed()) }, { iterator() })
+//        arrayData(arrayOf(0, 1, 2, 3, 4, 5), comparator)
+//                .checkSorted<Array<out Int>>( { sortedArrayWith(comparator) }, { sortedArrayWith(comparator.reversed()) }, { iterator() })
 
         // in-place
         val array = Array(6) { it }
diff --git a/libraries/stdlib/test/coroutines/SequenceBuilderTest.kt b/libraries/stdlib/test/coroutines/SequenceBuilderTest.kt
index 27fd572..351984c 100644
--- a/libraries/stdlib/test/coroutines/SequenceBuilderTest.kt
+++ b/libraries/stdlib/test/coroutines/SequenceBuilderTest.kt
@@ -16,9 +16,9 @@
 
 package test.coroutines
 
-import kotlin.test.*
-import kotlin.coroutines.experimental.buildSequence
 import kotlin.coroutines.experimental.buildIterator
+import kotlin.coroutines.experimental.buildSequence
+import kotlin.test.*
 
 class SequenceBuilderTest {
     @Test
@@ -268,7 +268,7 @@
 
         for (res in result) {
             effects.add("(") // marks step start
-            effects.add(res)
+//            effects.add(res)
             effects.add(")") // marks step end
         }
         assertEquals(
@@ -297,7 +297,7 @@
 
         var sum = 0
         repeat(10) {
-            sum += values.next() //.also(::println)
+//            sum += values.next() //.also(::println)
         }
         assertEquals(30, sum)
     }
diff --git a/libraries/stdlib/test/properties/delegation/MapAccessorsTest.kt b/libraries/stdlib/test/properties/delegation/MapAccessorsTest.kt
index 12c0b3f..544f424 100644
--- a/libraries/stdlib/test/properties/delegation/MapAccessorsTest.kt
+++ b/libraries/stdlib/test/properties/delegation/MapAccessorsTest.kt
@@ -1,6 +1,24 @@
+/*
+ * 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.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package test.properties.delegation.map
 
-import kotlin.test.*
+import kotlin.test.Test
+import kotlin.test.assertEquals
+import kotlin.test.assertFailsWith
 
 class ValByMapExtensionsTest {
     val map: Map<String, String> = hashMapOf("a" to "all", "b" to "bar", "c" to "code")
@@ -11,7 +29,7 @@
     val c: Any by map
     val d: String? by map
     val e: String by map.withDefault { "default" }
-    val f: String? by map.withDefault { null }
+    val f: String? by map.withDefault<String, String?> { null }
     // val n: Int by map // prohibited by type system
     val i: Int by genericMap
     val x: Double by genericMap
@@ -35,7 +53,7 @@
     val map2: MutableMap<String, CharSequence> = hashMapOf("a2" to "all")
 
     var a: String by map
-    var b: Any? by map
+//    var b: Any? by map
     var c: Int by map
     var d: String? by map
     var a2: String by map2.withDefault { "empty" }
@@ -43,7 +61,7 @@
 
     @Test fun doTest() {
         assertEquals("all", a)
-        assertEquals(null, b)
+//        assertEquals(null, b)
         assertEquals(1, c)
         c = 2
         assertEquals(2, c)