]> Cypherpunks repositories - gostls13.git/commit
go spec: conversion types starting with "func" must be parenthesized
authorRobert Griesemer <gri@golang.org>
Wed, 3 Oct 2012 20:46:37 +0000 (13:46 -0700)
committerRobert Griesemer <gri@golang.org>
Wed, 3 Oct 2012 20:46:37 +0000 (13:46 -0700)
commit3188ffc93138ca18857575052f74100d64e31df5
tree003826f65a99d6d40ab59a40579a2e7261877979
parent256daf2c85c0277298d7066e5b24c137ef332aa5
go spec: conversion types starting with "func" must be parenthesized

Also: Be explicit what operator means with respect to conversion types.

The parenthesis requirement is a language change. At the moment,
literal function types in conversions that cannot possibly be
followed by a '(' don't need parentheses. For instance:

        func(int)int(x)  ->  same as (func(int)int)(x)
        func()()(x)      ->  same as (func())(x)

but:

        func(int)(x)  ->  could be func(int)x {...}

Fixes #4109.

R=rsc, r, iant, ken, iant
CC=golang-dev
https://golang.org/cl/6584065
doc/go_spec.html