Minor, restructure parsing test case for '::'

This commit is contained in:
Alexander Udalov
2016-04-18 11:24:53 +03:00
parent 3dc32fb5db
commit 4706d4eaea
5 changed files with 345 additions and 275 deletions
+10 -30
View File
@@ -1,4 +1,4 @@
fun ok() {
fun simple() {
A::a
A::a + 1
Map<String, Int>::size
@@ -9,6 +9,11 @@ fun ok() {
a::b.c
a.b::c.d
(a::b)()
a.(b::c)()
}
fun genericType() {
a<b>::c
a<b>::c.d
a.b<c>::d
@@ -18,43 +23,18 @@ fun ok() {
a.b<c.d<e.f>>::g.h
a.b.c<d>.e<f>.g::h
}
a::b()
(a::b)()
a.(b::c)()
a.b::c()
fun nullableType() {
a?::b
a??::b
a<b>?::c
a<b?,c?>?::d
}
fun classLiteral() {
A::class
a<b,c>::class
::class
a b ::class
}
fun err0() {
a::b.c::d
}
fun err1() {
A::
}
fun err2() {
A::a::b
}
fun err3() {
::
}
fun typeArgumentsError() {
::a<b>
::a<b,c<*>>
a::b<c>
::a<b>()
}