fine? It should not.

On Friday, November 12, 2021 at 3:04:20 PM UTC+8 axel.wa...@googlemail.com 
wrote:

> Please ask an actual question, don't just post some code.
> FTR the code you posted (with the substitution you suggest) compiles and 
> runs fine using gotip.
>
> On Fri, Nov 12, 2021 at 6:18 AM tapi...@gmail.com <tapi...@gmail.com> 
> wrote:
>
>> sorry, a mistake, "int" -> "[]byte".
>>
>> On Friday, November 12, 2021 at 1:08:50 PM UTC+8 tapi...@gmail.com wrote:
>>
>>>
>>> package main
>>>
>>> import (
>>>     "fmt"
>>> )
>>>
>>> type byteview interface{string | int}
>>>
>>> type ByteView[T byteview] struct {v [0]T}
>>>
>>> func (bv ByteView[T]) Write(v T) (int, error) {
>>>     return 0, nil
>>> }
>>>
>>> type Writer[T byteview] interface {
>>>     Write(bs T)(int, error)
>>> }
>>>
>>> type ioWriter = Writer[[]byte] // []byte does not satisfy comparable
>>>
>>> func main() {
>>>     fmt.Println("Hello, playground")
>>> }
>>>
>> -- 
>> 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...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/golang-nuts/5342cd82-a51f-4d9d-af79-d7a5e2a1b663n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/golang-nuts/5342cd82-a51f-4d9d-af79-d7a5e2a1b663n%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/087f84b6-7866-4e36-8bc9-a85170a26e7en%40googlegroups.com.

Reply via email to