From: Robert Griesemer Date: Thu, 10 Mar 2022 02:36:53 +0000 (-0800) Subject: spec: clean up intro and replace bolded text with prose X-Git-Tag: go1.19beta1~1089 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=59d80227effa3027a37b1aa85eef88d1df7b1e81;p=gostls13.git spec: clean up intro and replace bolded text with prose - Remove "Draft" disclaimer. We're not done but the spec is in usable shape with respect to generics features. - Remove section on "Earlier version" and fold information into the "Intro" section. - Remove caveat for shifts: the rules for arithmetic operators on type parameters apply for them as well. - Simply state that we don't support arguments of type parameter type for the built-ins real, imag, and complex. Fixes #51182. Change-Id: I6df1427de685cfe7055b64e91753aa7ebff70565 Reviewed-on: https://go-review.googlesource.com/c/go/+/391695 Trust: Robert Griesemer Reviewed-by: Ian Lance Taylor --- diff --git a/doc/go_spec.html b/doc/go_spec.html index d241dada72..9b37e0ded0 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -1,21 +1,16 @@ -

Earlier version

- -

-For the pre-Go1.18 specification without generics support see -The Go Programming Language Specification. -

-

Introduction

-This is a reference manual for the Go programming language. For -more information and other documents, see golang.org. +This is the reference manual for the Go programming language. +The pre-Go1.18 version, without generics, can be found +here. +For more information and other documents, see golang.org.

@@ -4668,10 +4663,6 @@ and the other operand is not, the constant is implicitly to the type of the other operand.

-

-[The rules for shifts need adjustments for type parameters. Issue #51182.] -

-

The right operand in a shift expression must have integer type or be an untyped constant representable by a @@ -7257,10 +7248,6 @@ does not exist, delete is a no-op.

Manipulating complex numbers

-

-[We don't support generic arguments for these built-ins for Go 1.18.] -

-

Three functions assemble and disassemble complex numbers. The built-in function complex constructs a complex @@ -7323,6 +7310,10 @@ const c = imag(b) // untyped constant -1.4 _ = imag(3 << s) // illegal: 3 assumes complex type, cannot shift +

+Arguments of type parameter type are not permitted. +

+

Handling panics

Two built-in functions, panic and recover,