Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix interface inherit #45

Merged
merged 2 commits into from
Oct 11, 2023
Merged

Conversation

moeshin
Copy link
Contributor

@moeshin moeshin commented Oct 11, 2023

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
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
Copy link
Contributor Author

moeshin commented Oct 11, 2023

Sorry, you are right.

@gzuidhof
Copy link
Owner

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

@gzuidhof gzuidhof merged commit 342962e into gzuidhof:main Oct 11, 2023
1 check passed
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