Fix common misspellings

This commit is contained in:
Marcin Moskala
2018-11-25 23:35:33 +03:00
committed by Nikolay Krasko
parent 33961acb8d
commit 686cfa6fd2
58 changed files with 115 additions and 123 deletions
@@ -1,4 +1,4 @@
// dummy test of syntax error highlighing in tests
// dummy test of syntax error highlighting in tests
fun get() {
1 + 2 <!SYNTAX!>2 3 4<!>
@@ -11,7 +11,7 @@ public class C {
open fun m() {}
}
// Note that Data is resolved succesfully here because we don't step on error-scope
// Note that Data is resolved successfully here because we don't step on error-scope
val data: Data = Data()
companion <!CYCLIC_SCOPES_WITH_COMPANION!>object<!> : DerivedAbstract() {
@@ -50,7 +50,7 @@ object WithPropertyInBaseDifferentOrder {
class Data
public class C {
// Now it is succesfully resolved (vs. ErrorType like in the previous case)
// Now it is successfully resolved (vs. ErrorType like in the previous case)
val data: Data = Data()
open class <!CYCLIC_SCOPES_WITH_COMPANION!>Base<!>() {
@@ -3,7 +3,7 @@ enum class A(val c: Int) {
ONE(1),
TWO(2),
THREE(3),
FOURTY_TWO();
FORTY_TWO();
var last: A? = null
@@ -7,7 +7,7 @@ public final enum class A : kotlin.Enum<A> {
enum entry THREE
enum entry FOURTY_TWO
enum entry FORTY_TWO
private constructor A()
private constructor A(/*0*/ c: kotlin.Int)
@@ -3,7 +3,7 @@ enum class A(val c: Int) {
ONE(1),
TWO(2),
THREE(3),
FOURTY_TWO();
FORTY_TWO();
constructor(): this(42)
}
@@ -7,7 +7,7 @@ public final enum class A : kotlin.Enum<A> {
enum entry THREE
enum entry FOURTY_TWO
enum entry FORTY_TWO
private constructor A()
private constructor A(/*0*/ c: kotlin.Int)
@@ -21,7 +21,7 @@ class Outer<E> {
fun factoryString(): Outer<String>.Inner<String> = null!!
fun <T, Y> infer(x: T, y: Y): Outer<T>.Inner<Y> = null!!
val infered = infer("", 1)
val inferred = infer("", 1)
fun main() {
val outer = Outer<String>()
@@ -1,6 +1,6 @@
package
public val infered: Outer<kotlin.String>.Inner<kotlin.Int>
public val inferred: Outer<kotlin.String>.Inner<kotlin.Int>
public fun factoryString(): Outer<kotlin.String>.Inner<kotlin.String>
public fun </*0*/ T, /*1*/ Y> infer(/*0*/ x: T, /*1*/ y: Y): Outer<T>.Inner<Y>
public fun main(): kotlin.Unit
@@ -15,7 +15,7 @@ class Outer<E> {
fun factoryString(): Outer<String>.Inner = null!!
fun <T> infer(x: T): Outer<T>.Inner = null!!
val infered = infer("")
val inferred = infer("")
fun main() {
val outer = Outer<String>()
@@ -1,6 +1,6 @@
package
public val infered: Outer<kotlin.String>.Inner
public val inferred: Outer<kotlin.String>.Inner
public fun factoryString(): Outer<kotlin.String>.Inner
public fun </*0*/ T> infer(/*0*/ x: T): Outer<T>.Inner
public fun main(): kotlin.Unit
@@ -15,7 +15,7 @@ class Outer<in E> {
fun factoryString(): Outer<String>.Inner = null!!
fun <T> infer(x: T): Outer<T>.Inner = null!!
val infered = infer("")
val inferred = infer("")
fun main() {
val outer = Outer<CharSequence>()
@@ -1,6 +1,6 @@
package
public val infered: Outer<kotlin.String>.Inner
public val inferred: Outer<kotlin.String>.Inner
public fun factoryString(): Outer<kotlin.String>.Inner
public fun </*0*/ T> infer(/*0*/ x: T): Outer<T>.Inner
public fun main(): kotlin.Unit
@@ -16,7 +16,7 @@ class Outer<out E> {
fun factoryString(): Outer<String>.Inner = null!!
fun <T> infer(x: T): Outer<T>.Inner = null!!
val infered = infer("")
val inferred = infer("")
fun main() {
val outer = Outer<String>()
@@ -1,6 +1,6 @@
package
public val infered: Outer<kotlin.String>.Inner
public val inferred: Outer<kotlin.String>.Inner
public fun factoryString(): Outer<kotlin.String>.Inner
public fun </*0*/ T> infer(/*0*/ x: T): Outer<T>.Inner
public fun main(): kotlin.Unit
@@ -16,7 +16,7 @@ class Outer<E> {
fun factoryString(): Outer<String>.Inner = null!!
fun <T> infer(x: T): Outer<T>.Inner = null!!
val infered = infer("")
val inferred = infer("")
fun main() {
val outer: Outer<out String> = Outer<String>()
@@ -1,6 +1,6 @@
package
public val infered: Outer<kotlin.String>.Inner
public val inferred: Outer<kotlin.String>.Inner
public fun factoryString(): Outer<kotlin.String>.Inner
public fun </*0*/ T> infer(/*0*/ x: T): Outer<T>.Inner
public fun main(): kotlin.Unit
@@ -4,6 +4,6 @@ val test1f: suspend () -> Unit = <!TYPE_MISMATCH!>fun () {}<!>
val test2f: suspend Any.() -> Unit = <!TYPE_MISMATCH!>fun Any.() {}<!>
// This is a bug in the old inference and should be fixed in new inference
// see "Fix anonymous function literals handling in type checker" for more deatils
// see "Fix anonymous function literals handling in type checker" for more details
val test3f: suspend Any.(Int) -> Int = <!TYPE_MISMATCH!>fun (k: Int) = k + 1<!>
val test4f: SuspendFn = <!TYPE_MISMATCH!>fun Any.() {}<!>
@@ -26,7 +26,7 @@ fun threeLevelsReturnNoInitialization(x: Int?): Int? {
// Inner always jumps to outer
// And middle always calls inner
// So, in fact, middle never finished normally
// Hence 'y = 54' in middle is unreachable, and middle doesn't performs definite initalization
// Hence 'y = 54' in middle is unreachable, and middle doesn't performs definite initialization
// Hence, outer doesn't performs definite initialization
val y: Int
myRun outer@ {
@@ -35,7 +35,7 @@ fun outerFinallyInitializes() {
// Not reported because of repeating diagnostic
x = outerComputation()
} catch (e: java.lang.Exception) {
// can catch exception thrown by the inner, so x can be not initalized
// can catch exception thrown by the inner, so x can be not initialized
<!UNINITIALIZED_VARIABLE!>x<!>.inc()
log()
} finally {
@@ -85,7 +85,7 @@ fun testTakeUnless(x: Int?) {
fun testRepeatOnVal(x: Int) {
val y: Int
repeat(x) {
// reassignment instead of captured val initalization
// reassignment instead of captured val initialization
<!VAL_REASSIGNMENT!>y<!> = 42
}
println(<!UNINITIALIZED_VARIABLE!>y<!>)