1
1
mirror of https://github.com/github/semantic.git synced 2024-12-29 01:42:43 +03:00

Add additional type conversion test cases

This commit is contained in:
Rick Winfrey 2017-11-08 11:17:03 -08:00
parent e7921e1c1c
commit fcf453f759
6 changed files with 186 additions and 2 deletions

View File

@ -1,7 +1,15 @@
package main
func main() {
[]a.b(c.d)
*Point(p)
(*Point)(p)
<-chan int(c)
(<-chan int)(c)
func()(x)
(func())(x)
(func() int)(x)
func() int(x)
[]a.b(c.d)
([]a.b)(c.d)
e.f(g)
(e.f)(g)

View File

@ -1,7 +1,15 @@
package main
func main() {
[]x.y(z.e)
*Point(q)
(*Point)(q)
<-chan int(d)
(<-chan int)(d)
func()(f)
(func())(f)
(func() int)(f)
func() int(f)
[]x.y(z.e)
([]f.g)(h.i)
j.k(l)
(m.n)(o)

View File

@ -5,6 +5,52 @@
(Empty)
(Identifier)
(
(TypeConversion
(Pointer
(Identifier))
{ (Identifier)
->(Identifier) })
(Call
(Pointer
(Identifier))
{ (Identifier)
->(Identifier) }
(Empty))
(Receive
(Empty)
(TypeConversion
(BiDirectionalChannel
(Identifier))
{ (Identifier)
->(Identifier) }))
(TypeConversion
(ParenthesizedType
(ReceiveChannel
(Identifier)))
{ (Identifier)
->(Identifier) })
(TypeConversion
(Function
(Empty))
{ (Identifier)
->(Identifier) })
(TypeConversion
(ParenthesizedType
(Function
(Empty)))
{ (Identifier)
->(Identifier) })
(TypeConversion
(ParenthesizedType
(Function
(Identifier)))
{ (Identifier)
->(Identifier) })
(TypeConversion
(Function
(Identifier))
{ (Identifier)
->(Identifier) })
(TypeConversion
(Slice
(MemberAccess

View File

@ -5,6 +5,52 @@
(Empty)
(Identifier)
(
(TypeConversion
(Pointer
(Identifier))
{ (Identifier)
->(Identifier) })
(Call
(Pointer
(Identifier))
{ (Identifier)
->(Identifier) }
(Empty))
(Receive
(Empty)
(TypeConversion
(BiDirectionalChannel
(Identifier))
{ (Identifier)
->(Identifier) }))
(TypeConversion
(ParenthesizedType
(ReceiveChannel
(Identifier)))
{ (Identifier)
->(Identifier) })
(TypeConversion
(Function
(Empty))
{ (Identifier)
->(Identifier) })
(TypeConversion
(ParenthesizedType
(Function
(Empty)))
{ (Identifier)
->(Identifier) })
(TypeConversion
(ParenthesizedType
(Function
(Identifier)))
{ (Identifier)
->(Identifier) })
(TypeConversion
(Function
(Identifier))
{ (Identifier)
->(Identifier) })
(TypeConversion
(Slice
(MemberAccess

View File

@ -5,6 +5,44 @@
(Empty)
(Identifier)
(
(TypeConversion
(Pointer
(Identifier))
(Identifier))
(Call
(Pointer
(Identifier))
(Identifier)
(Empty))
(Receive
(Empty)
(TypeConversion
(BiDirectionalChannel
(Identifier))
(Identifier)))
(TypeConversion
(ParenthesizedType
(ReceiveChannel
(Identifier)))
(Identifier))
(TypeConversion
(Function
(Empty))
(Identifier))
(TypeConversion
(ParenthesizedType
(Function
(Empty)))
(Identifier))
(TypeConversion
(ParenthesizedType
(Function
(Identifier)))
(Identifier))
(TypeConversion
(Function
(Identifier))
(Identifier))
(TypeConversion
(Slice
(MemberAccess

View File

@ -5,6 +5,44 @@
(Empty)
(Identifier)
(
(TypeConversion
(Pointer
(Identifier))
(Identifier))
(Call
(Pointer
(Identifier))
(Identifier)
(Empty))
(Receive
(Empty)
(TypeConversion
(BiDirectionalChannel
(Identifier))
(Identifier)))
(TypeConversion
(ParenthesizedType
(ReceiveChannel
(Identifier)))
(Identifier))
(TypeConversion
(Function
(Empty))
(Identifier))
(TypeConversion
(ParenthesizedType
(Function
(Empty)))
(Identifier))
(TypeConversion
(ParenthesizedType
(Function
(Identifier)))
(Identifier))
(TypeConversion
(Function
(Identifier))
(Identifier))
(TypeConversion
(Slice
(MemberAccess