MCPcopy Create free account
hub / github.com/alaingilbert/agl / TestCodeGen_OperatorOverloading

Function TestCodeGen_OperatorOverloading

pkg/agl/codegen_test.go:1883–1916  ·  view source on GitHub ↗

func TestCodeGen_GenericMethod(t *testing.T) { src := ` type Person struct { } fn (p Person) speak[T any, U any](a T, b U) string { fmt.Println(a) } fn main() { p1 := Person{} p1.speak("hello", 123) p1.speak(123, "hello") } ` expected := `type Person struct { } func (p Person) speak__string_in

(t *testing.T)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 3

NewTestFunction · 0.85
WithMutEnforcedFunction · 0.85
testCodeGen2Function · 0.85

Tested by

no test coverage detected