Test data fixed

This commit is contained in:
Andrey Breslav
2014-06-30 17:14:34 +04:00
parent 195274370f
commit 0cbbb6a0db
72 changed files with 219 additions and 216 deletions
@@ -135,7 +135,7 @@ class A() : BodyTag("a") {
get() = attributes["href"]
set(value) {
if (value != null) {
attributes.put("href", <!DEBUG_INFO_SMARTCAST!>value<!>)
attributes.put("href", value)
// attributes["href"] = value //doesn't work: KT-1355
}
}
@@ -23,5 +23,6 @@ import p.*
open class K0 : Foo()
class K : K0() {
fun foo(f: () -> Unit) {}
// We keep this test to make sure ACCIDENTAL_OVERRIDE is not reported
<!VIRTUAL_MEMBER_HIDDEN!>fun <!CANNOT_WEAKEN_ACCESS_PRIVILEGE!>foo<!>(f: () -> Unit)<!> {}
}
@@ -15,6 +15,6 @@ public class Y extends X<A> {
// FILE: test.kt
fun main() {
Y().foo()<!UNSAFE_CALL!>.<!>hashCode()
Y().foo().hashCode()
Y().bar(null)
}
@@ -1,29 +1,29 @@
import java.sql.DriverManager
fun getConnection(url: String?) {
DriverManager.<!NONE_APPLICABLE!>getConnection<!>(url)
DriverManager.getConnection(url)
DriverManager.getConnection(url!!) : java.sql.Connection
}
fun getConnection(url: String?, props: java.util.Properties?) {
DriverManager.<!NONE_APPLICABLE!>getConnection<!>(url, props)
DriverManager.getConnection(url, props)
DriverManager.getConnection(url!!, props) : java.sql.Connection
}
fun getConnection(url: String?, user: String?, password: String?) {
DriverManager.<!NONE_APPLICABLE!>getConnection<!>(url, user!!, password!!)
DriverManager.<!NONE_APPLICABLE!>getConnection<!>(url!!, user, password!!)
DriverManager.<!NONE_APPLICABLE!>getConnection<!>(url!!, user!!, password)
DriverManager.getConnection(url!!, user!!, password!!) : java.sql.Connection
DriverManager.getConnection(url, user!!, password!!)
DriverManager.getConnection(url!!, user, password<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>)
DriverManager.getConnection(url<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>, user<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>, password)
DriverManager.getConnection(url<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>, user<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>, password<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>) : java.sql.Connection
}
fun getDriver(url: String?) {
DriverManager.getDriver(<!TYPE_MISMATCH!>url<!>)
DriverManager.getDriver(url)
DriverManager.getDriver(url!!) : java.sql.Driver
}
fun registerDriver(driver: java.sql.Driver?) {
DriverManager.registerDriver(<!TYPE_MISMATCH!>driver<!>)
DriverManager.registerDriver(driver)
DriverManager.registerDriver(driver!!)
}
@@ -1,5 +1,5 @@
fun executeQuery(statement: java.sql.Statement, cmd: String?) {
statement.executeQuery(<!TYPE_MISMATCH!>cmd<!>)
statement.executeQuery(cmd)
statement.executeQuery(cmd!!) : java.sql.ResultSet
}
@@ -8,6 +8,6 @@ fun executeQuery(statement: java.sql.PreparedStatement) {
}
fun executeUpdate(statement: java.sql.Statement, cmd: String?) {
statement.<!NONE_APPLICABLE!>executeUpdate<!>(cmd)
statement.executeUpdate(cmd)
statement.executeUpdate(cmd!!)
}
@@ -1,10 +1,11 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
//KT-1270 Poor highlighting when trying to dereference a nullable reference
package kt1270
fun foo() {
val sc = java.util.HashMap<String, SomeClass>()[""]
val <!UNUSED_VARIABLE!>value<!> = sc<!UNSAFE_CALL!>.<!>value
val value = sc.value
}
private class SomeClass() {