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

cgen: fix interface type generation for generic struct #22189

Merged
merged 6 commits into from
Sep 14, 2024

Conversation

felipensp
Copy link
Member

Fix #22186

@StunxFS
Copy link
Contributor

StunxFS commented Sep 10, 2024

I think IB should necessarily be IB[T].

struct Foo[T] implements IA, IB[T] { 
         a int 
         b T 
 }

@felipensp felipensp marked this pull request as ready for review September 10, 2024 10:56
@felipensp
Copy link
Member Author

I think IB should necessarily be IB[T].

struct Foo[T] implements IA, IB[T] { 
         a int 
         b T 
 }

What do you think @medvednikov ? This can be threated in another PR though.

@medvednikov
Copy link
Member

I agree, it should be struct Foo[T] implements IA, IB[T]

@felipensp
Copy link
Member Author

I agree, it should be struct Foo[T] implements IA, IB[T]

I've changed the implements_type to use TypeNode to save the token pos for checker error message.

Copy link
Member

@spytheman spytheman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent work.

@spytheman
Copy link
Member

Can I merge this now @felipensp , and then #22218 or ?

@spytheman spytheman merged commit 5fcfc27 into vlang:master Sep 14, 2024
79 checks 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.

C error when implementing two interfaces, one of them generic
4 participants