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)