goplus / gop

The Go+ programming language is designed for engineering, STEM education, and data science
https://goplus.org
Apache License 2.0
8.89k stars 547 forks source link

update:support declared function in classfile's overload decl #1875

Closed luoliwoshang closed 2 months ago

luoliwoshang commented 2 months ago

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
}
codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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

Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.