On Wed, Jul 3, 2019 at 4:39 PM Gert <gert.cuyk...@gmail.com> wrote:
>
> On Thursday, July 4, 2019 at 12:39:34 AM UTC+2, Ian Lance Taylor wrote:
>>
>> On Wed, Jul 3, 2019 at 3:30 PM Gert <gert....@gmail.com> wrote:
>> >
>> > I changed /usr/local/go/src/builtin/builtin.go
>> >
>> > type error interface {
>> >   Error() string
>> >   Unwrap() wrapper.Wrapper
>> > }
>> >
>> > But after compiling go successfully with ./all.bash it seems type error is 
>> > stil
>> >
>> > type error interface {
>> >   Error() string
>> > }
>>
>> The type "error" is implemented directly in the Go compiler.  The code
>> in builtin/builtin.go only exists for documentation purposes.  If you
>> want to change error, you'll need to change the compiler.
>
>
> Ok thx trying to dig my way in /usr/local/go/src/go but grepping for error 
> interface doesn't give me a clue where I can find the predefined error 
> interface :( do you perhaps have a path of a filename for me please where it 
> get defined?

It's created by makeErrorInterface in
cmd/compile/internal/gc/universe.go.  But I have no idea what the
consequences of changing that function would be.  I would not be
surprised if other code in the compiler implicitly assumes the current
definition.

Ian

-- 
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/CAOyqgcVBHVS1wsgYE5gLCW86RU_prLVLs5s0n0j5Kdc7yoLEtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to