Improved error reporting for candidates with wrong parameter count

This commit is contained in:
Stanislav Erokhin
2015-08-31 20:32:59 +03:00
parent 8ea6f36903
commit 5ded315cbb
23 changed files with 82 additions and 52 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
// ERROR: None of the following functions can be called with the arguments supplied: public open fun valueOf(p0: kotlin.Short): kotlin.Short! defined in java.lang.Short public open fun valueOf(p0: kotlin.String!): kotlin.Short! defined in java.lang.Short public open fun valueOf(p0: kotlin.String!, p1: kotlin.Int): kotlin.Short! defined in java.lang.Short
// ERROR: None of the following functions can be called with the arguments supplied: public open fun valueOf(p0: kotlin.Short): kotlin.Short! defined in java.lang.Short public open fun valueOf(p0: kotlin.String!): kotlin.Short! defined in java.lang.Short
package demo
class Test {
+1 -1
View File
@@ -1,5 +1,5 @@
// ERROR: None of the following functions can be called with the arguments supplied: public constructor FileInputStream(p0: [ERROR : Unresolved java classifier: FileDescriptor]!) defined in java.io.FileInputStream public constructor FileInputStream(p0: java.io.File!) defined in java.io.FileInputStream public constructor FileInputStream(p0: kotlin.String!) defined in java.io.FileInputStream
// ERROR: None of the following functions can be called with the arguments supplied: public constructor InputStreamReader(p0: java.io.InputStream!) defined in java.io.InputStreamReader public constructor InputStreamReader(p0: java.io.InputStream!, p1: [ERROR : Unresolved java classifier: CharsetDecoder]!) defined in java.io.InputStreamReader public constructor InputStreamReader(p0: java.io.InputStream!, p1: java.nio.charset.Charset!) defined in java.io.InputStreamReader public constructor InputStreamReader(p0: java.io.InputStream!, p1: kotlin.String!) defined in java.io.InputStreamReader
// ERROR: Type mismatch: inferred type is java.io.DataInputStream but java.io.InputStream! was expected
// ERROR: Assignments are not expressions, and only expressions are allowed in this context
// ERROR: Unresolved reference: close
import java.io.*
+2 -2
View File
@@ -1,6 +1,6 @@
// ERROR: Unresolved reference: LinkedList
// ERROR: None of the following functions can be called with the arguments supplied: public open fun add(e: kotlin.Any): kotlin.Boolean defined in java.util.ArrayList public open fun add(index: kotlin.Int, element: kotlin.Any): kotlin.Unit defined in java.util.ArrayList
// ERROR: None of the following functions can be called with the arguments supplied: public open fun add(e: kotlin.Any): kotlin.Boolean defined in java.util.ArrayList public open fun add(index: kotlin.Int, element: kotlin.Any): kotlin.Unit defined in java.util.ArrayList
// ERROR: Null can not be a value of a non-null type kotlin.Any
// ERROR: Null can not be a value of a non-null type kotlin.Any
import java.util.*
public class Lists {
@@ -1,5 +1,5 @@
// ERROR: None of the following functions can be called with the arguments supplied: public fun <T> listOf(): kotlin.List<kotlin.String> defined in kotlin public fun <T> listOf(vararg values: kotlin.String): kotlin.List<kotlin.String> defined in kotlin public fun <T> listOf(value: kotlin.String): kotlin.List<kotlin.String> defined in kotlin
// ERROR: None of the following functions can be called with the arguments supplied: public fun <T> setOf(): kotlin.Set<kotlin.String> defined in kotlin public fun <T> setOf(vararg values: kotlin.String): kotlin.Set<kotlin.String> defined in kotlin public fun <T> setOf(value: kotlin.String): kotlin.Set<kotlin.String> defined in kotlin
// ERROR: Null can not be a value of a non-null type kotlin.String
// ERROR: Null can not be a value of a non-null type kotlin.String
import java.util.*
class A {