GreatSyntacticShift: 'namespace' -> 'package'

This commit is contained in:
Andrey Breslav
2011-12-25 15:51:59 +04:00
parent 9f4cd37dbb
commit f52eae71d0
141 changed files with 447 additions and 460 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
namespace abstract
package abstract
class MyClass() {
//properties
@@ -118,7 +118,7 @@ enum class MyEnum() {
abstract enum class MyAbstractEnum() {}
namespace MyNamespace {
package MyNamespace {
//properties
val <error>a</error>: Int
val a1: Int = 1
+1 -1
View File
@@ -1,4 +1,4 @@
namespace boundsWithSubstitutors {
package boundsWithSubstitutors {
open class A<T>
class B<X : A<X>>()
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Jet86
package Jet86
class A {
class object {
+1 -1
View File
@@ -37,7 +37,7 @@ val <T> T.<error>foo</error> : T
fun Int.foo() = this
namespace null_safety {
package null_safety {
fun parse(<warning>cmd</warning>: String): Command? { return null }
class Command() {
@@ -13,28 +13,28 @@ trait BB1 : BA1<Int> {}
trait BB2 : <error>BA1<Any>, BB1</error> {}
namespace x {
package x {
trait AA1<out T> {}
trait AB1 : AA1<Int> {}
trait AB3 : AA1<Comparable<Int>> {}
trait AB2 : AA1<Number>, AB1, AB3 {}
}
namespace x2 {
package x2 {
trait AA1<out T> {}
trait AB1 : AA1<Any> {}
trait AB3 : AA1<Comparable<Int>> {}
trait AB2 : <error>AA1<Number>, AB1, AB3</error> {}
}
namespace x3 {
package x3 {
trait AA1<in T> {}
trait AB1 : AA1<Any> {}
trait AB3 : AA1<Comparable<Int>> {}
trait AB2 : AA1<Number>, AB1, AB3 {}
}
namespace sx2 {
package sx2 {
trait AA1<in T> {}
trait AB1 : AA1<Int> {}
trait AB3 : AA1<Comparable<Int>> {}
+1 -1
View File
@@ -1,4 +1,4 @@
namespace Jet87
package Jet87
open class A() {
fun foo() : Int = 1
@@ -1,8 +1,8 @@
namespace root
package root
namespace a {
package a {
}
val x = <error>a</error>
val y2 = <error>namespace</error>
val y2 = <error>package</error>
+3 -3
View File
@@ -1,6 +1,6 @@
namespace foobar
package foobar
namespace a {
package a {
import java.*
val a : util.List<Int>? = null
@@ -12,7 +12,7 @@ abstract class Foo<T>() {
abstract val x : T<Int>
}
namespace a {
package a {
import java.util.*
val b : List<Int>? = a
+3 -3
View File
@@ -1,4 +1,4 @@
namespace toplevelObjectDeclarations {
package toplevelObjectDeclarations {
open class Foo(y : Int) {
open fun foo() : Int = 1
}
@@ -28,7 +28,7 @@ namespace toplevelObjectDeclarations {
val z = y.foo()
}
namespace nestedObejcts {
package nestedObejcts {
object A {
val b = B
val d = A.B.A
@@ -58,7 +58,7 @@ namespace nestedObejcts {
val e = B.<error>A</error>.B
}
namespace localObjects {
package localObjects {
object A {
val x : Int = 0
}
+3 -3
View File
@@ -1,6 +1,6 @@
namespace override
package override
namespace normal {
package normal {
trait MyTrait {
fun foo()
}
@@ -37,7 +37,7 @@ namespace normal {
}
}
namespace generics {
package generics {
trait MyTrait<T> {
fun foo(t: T) : T
}
@@ -1,4 +1,4 @@
namespace qualified_expressions
package qualified_expressions
fun test(s: String?) {
val <warning>a</warning>: Int = <error>s?.length</error>
+1 -1
View File
@@ -21,7 +21,7 @@ fun foo1() : Unit {
this<error>@a</error>
}
namespace closures {
package closures {
class A(val a:Int) {
class B() {
+2 -2
View File
@@ -1,11 +1,11 @@
namespace redeclarations {
package redeclarations {
object <error>A</error> {
val x : Int = 0
val A = 1
}
namespace <error>A</error> {
package <error>A</error> {
class A {}
}
+1 -1
View File
@@ -47,6 +47,6 @@ fun test(<warning>l</warning> : java.util.List<Int>) {
}
namespace xxx {
package xxx {
import java.lang.Class;
}
+1 -1
View File
@@ -1,4 +1,4 @@
namespace variance
package variance
abstract class Consumer<in T> {}
@@ -1,7 +1,7 @@
// One of the two passes is making a scope and turning vals into functions
// See KT-76
namespace x
package x
val b : Foo = Foo()
val a1 = b.compareTo(2)
@@ -1,4 +1,4 @@
namespace Test.SubTest.AnotherTest
package Test.SubTest.AnotherTest
open class TestClass {
}
@@ -1,4 +1,4 @@
namespace Tests
package Tests
import java.util.*
@@ -1,4 +1,4 @@
namespace Tests
package Tests
class A : java.<caret>
@@ -1,4 +1,4 @@
namespace Test.MyTest
package Test.MyTest
class A {
class object {
@@ -1,4 +1,4 @@
namespace Test.MyTest
package Test.MyTest
fun test() {
Test.<caret>
@@ -1,4 +1,4 @@
namespace Test
package Test
class Some() {
fun methodName() {
@@ -1,4 +1,4 @@
namespace Test.MyTest
package Test.MyTest
class A {
class object {
@@ -1,4 +1,4 @@
namespace Test.MyTest
package Test.MyTest
class A {
class object {
@@ -1,5 +1,5 @@
// "Add function body" "true"
namespace a {
package a {
fun <caret>foo() {
}
}
@@ -1,4 +1,4 @@
// "Add function body" "true"
namespace a {
package a {
fun <caret>foo()
}
@@ -1,5 +1,5 @@
// "Add primary constructor to A" "true"
namespace a
package a
class A() {
var i : Int = <caret>1
@@ -1,5 +1,5 @@
// "Add primary constructor to A" "true"
namespace a
package a
class A<caret>() {
var i : Int = 1
@@ -1,5 +1,5 @@
// "Add primary constructor to A" "true"
namespace a
package a
class A {
var i : Int = <caret>1
@@ -1,5 +1,5 @@
// "Add primary constructor to A" "true"
namespace a
package a
class A<caret> {
var i : Int = 1
@@ -1,5 +1,5 @@
// "Import Class" "true"
namespace a
package a
import a.b.M
@@ -7,6 +7,6 @@ fun test() {
val v = M
}
namespace b {
package b {
class M() { }
}
@@ -1,10 +1,10 @@
// "Import Class" "true"
namespace a
package a
fun test() {
val v = <caret>M
}
namespace b {
package b {
class M() { }
}
@@ -1,3 +1,3 @@
namespace TestData
package TestData
class TestSample() {}
@@ -1,9 +1,9 @@
// "Remove initializer from property" "true"
namespace a
package a
import java.util.Collections
namespace b {
package b {
import java.util.List
@@ -1,5 +1,5 @@
// "Remove initializer from property" "true"
namespace a
package a
class M {
trait A {
@@ -1,5 +1,5 @@
// "Remove initializer from property" "true"
namespace a
package a
class M {
trait A {
@@ -1,5 +1,5 @@
// "Remove initializer from property" "true"
namespace a
package a
import java.util.Collections
import java.util.List
@@ -1,9 +1,9 @@
// "Remove initializer from property" "true"
namespace a
package a
import java.util.Collections
namespace b {
package b {
import java.util.List
@@ -1,9 +1,9 @@
// "Remove initializer from property" "true"
namespace a
package a
import java.util.Collections
namespace b {
package b {
import java.util.List
@@ -1,5 +1,5 @@
// "Remove initializer from property" "true"
namespace a
package a
class M {
trait A {
@@ -1,5 +1,5 @@
// "Remove initializer from property" "true"
namespace a
package a
class M {
trait A {
@@ -1,5 +1,5 @@
// "Remove initializer from property" "true"
namespace a
package a
import java.util.Collections
@@ -1,9 +1,9 @@
// "Remove initializer from property" "true"
namespace a
package a
import java.util.Collections
namespace b {
package b {
class M {
trait A {
@@ -1,5 +1,5 @@
// "Add return type declaration" "true"
namespace a
package a
class A() {
protected fun <caret>foo() : Int = 1
@@ -1,5 +1,5 @@
// "Add return type declaration" "true"
namespace a
package a
class A() {
public fun <caret>foo() : String = "a"
@@ -1,5 +1,5 @@
// "Add return type declaration" "true"
namespace a
package a
import java.util.List
@@ -1,5 +1,5 @@
// "Add return type declaration" "false"
namespace a
package a
class A() {
internal protected fun <caret>foo() = 1
@@ -1,5 +1,5 @@
// "Add return type declaration" "true"
namespace a
package a
class A() {
protected fun <caret>foo() = 1
@@ -1,5 +1,5 @@
// "Add return type declaration" "false"
namespace a
package a
class A() {
public fun <caret>foo()
@@ -1,5 +1,5 @@
// "Add return type declaration" "true"
namespace a
package a
class A() {
public fun <caret>foo() = "a"
@@ -1,4 +1,4 @@
// "Add return type declaration" "true"
namespace a
package a
public val <caret>l = java.util.Collections.emptyList<Int>()