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

update:correct anonymous overloaded function naming #1833

Merged
merged 2 commits into from
Apr 1, 2024

Conversation

luoliwoshang
Copy link
Contributor

@luoliwoshang luoliwoshang commented Apr 1, 2024

  • correct compiled overloaded function declaration when have a anonymous overloaded function
// origin.gop
func MulInt(a,b int) int  {
	return a * b
}
func MulFloat(a,b float64) float64  {
	return a * b
}
func Mul = (
	func(a string,b string){}
	MulInt
	MulFloat
)

The overloaded function declaration generated in the previous version lacks the location of the anonymous overloaded function.

// before autogen.go
const _ = true
const Gopo_Mul = "MulInt,MulFloat"

func Mul__0(a string, b string) {
}

func MulInt(a int, b int) int {
	return a * b
}

func MulFloat(a float64, b float64) float64 {
	return a * b
}
// current autogen.go
const _ = true
const Gopo_Mul = ",MulInt,MulFloat"
....

Copy link

codecov bot commented Apr 1, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.60%. Comparing base (9875bae) to head (1ec9246).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1833   +/-   ##
=======================================
  Coverage   92.60%   92.60%           
=======================================
  Files          42       42           
  Lines       11439    11440    +1     
=======================================
+ Hits        10593    10594    +1     
  Misses        684      684           
  Partials      162      162           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@xushiwei xushiwei merged commit 8dd9212 into goplus:main Apr 1, 2024
18 checks passed
@luoliwoshang luoliwoshang deleted the cl-overload branch April 1, 2024 14:49
@luoliwoshang luoliwoshang restored the cl-overload branch April 1, 2024 14:49
@luoliwoshang luoliwoshang deleted the cl-overload branch April 1, 2024 14:49
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