Skip to content

cmd/gc: conversion should permit trailing comma after argument #4162

@griesemer

Description

@griesemer
With the newly accepted spec change ( http://golang.org/cl/6572049/ ), all
conversions must accept a trailing comma after the argument to be converted. The
following program should compile w/o errors:

package p

var (
    _ = int(1.0,)      // comma is permitted
    _ = []byte("foo",) // syntax error: unexpected comma
    _ = chan int(nil,) // syntax error: unexpected comma
    _ = (func())(nil,) // syntax error: unexpected comma
)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions