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 generics with package alias #1360

merged 8 commits into from Oct 26, 2022


Copy link

@sdghchj sdghchj commented Oct 25, 2022

Describe the PR
fix generics bug:

  1. More than one generics types, including parameter types, actually come from different packages, but with the same short package name and type name.
  2. Import generics types from a package with an alias.

View details in ./testdata/generics-package-alias

Now we determine mode type name conflict during the phase of collecting types, no longer determine during the parsing phase.

Relation issue

Signed-off-by: sdghchj <>
Signed-off-by: sdghchj <>
Signed-off-by: sdghchj <>
Signed-off-by: sdghchj <>
Signed-off-by: sdghchj <>
Copy link

codecov bot commented Oct 26, 2022

Codecov Report

Base: 95.68% // Head: 95.70% // Increases project coverage by +0.02% 🎉

Coverage data is based on head (be7f3d8) compared to base (277a278).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1360      +/-   ##
+ Coverage   95.68%   95.70%   +0.02%     
  Files          14       14              
  Lines        2894     2818      -76     
- Hits         2769     2697      -72     
+ Misses         70       67       -3     
+ Partials       55       54       -1     
Impacted Files Coverage Δ
generics_other.go 100.00% <ø> (ø)
schema.go 100.00% <ø> (ø)
generics.go 100.00% <100.00%> (ø)
packages.go 92.17% <100.00%> (+1.22%) ⬆️
parser.go 93.68% <100.00%> (-0.20%) ⬇️
types.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: sdghchj <>
Signed-off-by: sdghchj <>
Signed-off-by: sdghchj <>
Copy link

@ubogdan ubogdan left a comment

Choose a reason for hiding this comment

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


@sdghchj sdghchj merged commit 0da94ff into master Oct 26, 2022
10 checks passed
@sdghchj sdghchj deleted the fix-generics-with-package-alias branch October 26, 2022 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants