diff --git a/src/cmd/gc/go.y b/src/cmd/gc/go.y index a42a7488f76..530e54112a5 100644 --- a/src/cmd/gc/go.y +++ b/src/cmd/gc/go.y @@ -915,6 +915,7 @@ pexpr_no_paren: } | '(' expr_or_type ')' '{' start_complit braced_keyval_list '}' { + yyerror("cannot parenthesize type in composite literal"); $$ = $5; $$->right = $2; $$->list = $6;