Skip to content

Conversation

@sudo-suhas
Copy link
Collaborator

WIP PR to fix the issue reported in #153.

@sudo-suhas sudo-suhas changed the title Package import of type alias WIP: Package import of type alias Aug 21, 2021
Comment on lines 1 to 5
package message

import "github.com/matryer/moq/pkg/moq/testpackages/typealiaspkgimport/internal/message"

type Message = message.Message

Choose a reason for hiding this comment

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

You're importing a package with the same name as the current package. I wonder if that matters. Does the issue still manifest if you do e.g.

Suggested change
package message
import "github.com/matryer/moq/pkg/moq/testpackages/typealiaspkgimport/internal/message"
type Message = message.Message
package message
import internalmessage "github.com/matryer/moq/pkg/moq/testpackages/typealiaspkgimport/internal/message"
type Message = internalmessage.Message

Copy link
Collaborator Author

@sudo-suhas sudo-suhas Aug 24, 2021

Choose a reason for hiding this comment

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

I have changed the name of the package where the type alias was present to alias. The same issue is still present.

Choose a reason for hiding this comment

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

Aw beans.

@sudo-suhas sudo-suhas force-pushed the type-alias-pkg-import branch from a66f8a5 to 9311dad Compare August 24, 2021 13:08
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.

3 participants