Skip to content

Commit 1518638

Browse files
ianlancetaylorwillpoint
authored andcommitted
_content/blog/deconstructing-type-parameters: tipo, missing comma
Change-Id: I279a4c5ba6aff116fc0795996ee811da375e02b8 Reviewed-on: https://go-review.googlesource.com/c/website/+/530681 Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Eli Bendersky <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]>
1 parent b5b4d30 commit 1518638

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_content/blog/deconstructing-type-parameters.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ The [Go assignment rules](https://go.dev/ref/spec#Assignability) allow
8585
us to pass a value of type `MySlice` to a parameter of type
8686
`[]string`, so calling `Clone1` is fine.
8787
But `Clone1` will return a value of type `[]string`, not a value of
88-
type `MySlce`.
88+
type `MySlice`.
8989
The type `[]string` doesn't have a `String` method, so the compiler
9090
reports an error.
9191

@@ -180,7 +180,7 @@ It might seem that we would always want to permit passing `MySlice`,
180180
so why not make that the default?
181181
Or, if we need to support exact matching, why not flip things around,
182182
so that a constraint of `[]E` permits a named type while a constraint
183-
of, say, `=[]E` only permits slice type literals?
183+
of, say, `=[]E`, only permits slice type literals?
184184

185185
To explain this, let's first observe that a type parameter list like
186186
`[T ~MySlice]` doesn't make sense.

0 commit comments

Comments
 (0)