Skip to content

Fix interface inherit#45

Merged
gzuidhof merged 2 commits into
gzuidhof:mainfrom
moeshin:fix-interface-inherit
Oct 11, 2023
Merged

Fix interface inherit#45
gzuidhof merged 2 commits into
gzuidhof:mainfrom
moeshin:fix-interface-inherit

Conversation

@moeshin

@moeshin moeshin commented Oct 11, 2023

Copy link
Copy Markdown
Contributor
package test_tygo

import "io"

type File interface {
	io.Reader
	io.Writer
	io.Closer

	Rename() bool
}

original

// Code generated by tygo. DO NOT EDIT.

//////////
// source: type.go

export type File = 
    any /* io.Reader */    any /* io.Writer */    any /* io.Closer */;

fixed

// Code generated by tygo. DO NOT EDIT.

//////////
// source: type.go

export type File = 
    any /* io.Reader */ &
    any /* io.Writer */ &
    any /* io.Closer */;

@gzuidhof

Copy link
Copy Markdown
Owner

I think perhaps in the output this should be & instead of |, as it's those interfaces combined instead of one of them (if that makes sense) - if I'm wrong do let me know.

@moeshin

moeshin commented Oct 11, 2023

Copy link
Copy Markdown
Contributor Author

Sorry, you are right.

@gzuidhof

Copy link
Copy Markdown
Owner

Thank you :) No need to apologize, I really appreciate the contribution!

@gzuidhof gzuidhof merged commit 342962e into gzuidhof:main Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants