I updated https://github.com/golang/go/issues/31076 to reflect the comments here. Thank you both.
On Fri, Mar 29, 2019 at 9:57 AM Ian Lance Taylor <i...@golang.org> wrote: > On Thu, Mar 28, 2019 at 11:17 PM Jan Mercl <0xj...@gmail.com> wrote: > > > > The Compatibility section of the proposal says: "I think that this would > break no existing code, as a user function invocation untyped(EXPR) is not > at present allowed in constant specifications." > > > > It's true that user function cannot be called in a constant expression. > But conversion to a user defined type is legal: > https://play.golang.org/p/AXSFzMR677c > > > > IOW, the proposal is not backwards compatible. > > If we treat untyped as an ordinary predeclared identifier, then I > think the proposal remains backward compatible. The new predeclared > untyped is not available in packages that defined the name untyped in > package scope. And there is no other way write untyped(EXPR). > > Ian > -- *Michael T. jonesmichael.jo...@gmail.com <michael.jo...@gmail.com>* -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.