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:support declared function in classfile's overload decl #1875

Merged
merged 1 commit into from
May 27, 2024

Conversation

luoliwoshang
Copy link
Contributor

@luoliwoshang luoliwoshang commented May 16, 2024

#1874
The overloaded function declaration in classfile will eventually become an overloaded method of type classfile

Rect.gox

func addString(a, b string) string {
	return a + b
}

func addInt(a, b int) int {
	return a + b
}

func add = (
	addInt
	addString
)

autogen.go

package main

const Gopo_Rect_add = ".addInt,.addString"

type Rect struct {
}

func (this *Rect) addString(a string, b string) string {
	return a + b
}
func (this *Rect) addInt(a int, b int) int {
	return a + b
}

Copy link

codecov bot commented May 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.29%. Comparing base (01bb888) to head (d4c5639).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1875      +/-   ##
==========================================
+ Coverage   93.28%   93.29%   +0.01%     
==========================================
  Files          41       41              
  Lines       11612    11631      +19     
==========================================
+ Hits        10832    10851      +19     
  Misses        623      623              
  Partials      157      157              

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

@luoliwoshang luoliwoshang changed the title [wip] update:support named function in classfile's overload decl [wip] update:support declared function in classfile's overload decl May 16, 2024
cl/compile.go Outdated Show resolved Hide resolved
cl/compile.go Outdated Show resolved Hide resolved
cl/compile.go Outdated Show resolved Hide resolved
@luoliwoshang luoliwoshang force-pushed the overload/classfile branch 5 times, most recently from 026266e to 3ef19b3 Compare May 22, 2024 09:46
@luoliwoshang luoliwoshang changed the title [wip] update:support declared function in classfile's overload decl update:support declared function in classfile's overload decl May 22, 2024
cl/compile.go Outdated Show resolved Hide resolved
cl/compile.go Outdated Show resolved Hide resolved
cl/compile.go Outdated Show resolved Hide resolved
@xushiwei xushiwei merged commit b06d64d into goplus:main May 27, 2024
15 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.

None yet

3 participants