Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
cmd/go2go: square bracket syntax doesn't work for multiple type arguments #40788
The following program gives a syntax error. Using the round bracket syntax for instantiating the function works as expected. It appears that the parser doesn't allow the new square bracket syntax with multiple type parameters.
The parser currently decides that it will use square brackets based on the first parameterized declaration. If the first use of square brackets it is a use rather than a declaration, it doesn't always understand it. This is a temporary hack until we settle on a syntax.