What steps will reproduce the problem?
1. See screenshot for sample program - specifically create a variable of a
predefined function type, or a function that uses only one predefined variable
type as parameters
eg example program
package main
type (
FT int32
USEFUNC func(FT, FT) FT
)
var (
f USEFUNC
a, b FT = 1, 2
)
func main() {
f = f21
println(f(a, b))
}
func f21(a, b FT) FT { return a + b }
func f11(a int) int { return a * a }
2. Compile and observe the "Golang Ast View" display
3.
a. Function "f21" appears as a sub-element of type FT - I would have expected
it to appear under functions.
b. variable "f" is defined as type "USEFUNC", it appears as a normal variable,
not under the "USEFUNC" display
What is the expected output? What do you see instead?
...It's not clear exactly what rules are being used to generate the abstract
syntax tree - appears to be based on return type for functions. But in the
given example f is a function of type USEFUNC with return type FT but appears
under neither.
Using version X10 (1.5625) on Windows XP SP3 , x86
Please provide any additional information below.
...(screen image attached) Apologies if I've not understood the method
Original issue reported on code.google.com by mdd...@gmail.com on 27 Nov 2011 at 10:36
Original issue reported on code.google.com by
mdd...@gmail.com
on 27 Nov 2011 at 10:36Attachments: