-- use context.Background --
package pkg

import "context"

func tpfn1[T any](ctx context.Context, x T)             {}
func tpfn2[T1, T2 any](ctx context.Context, x T1, y T2) {}

func tpbar() {
	tpfn1[int](context.Background(), 0) //@ diag(`do not pass a nil Context`)
	tpfn1(context.Background(), 0)      //@ diag(`do not pass a nil Context`)

	tpfn2[int, int](context.Background(), 0, 0) //@ diag(`do not pass a nil Context`)
	tpfn2(context.Background(), 0, 0)           //@ diag(`do not pass a nil Context`)
}
-- use context.TODO --
package pkg

import "context"

func tpfn1[T any](ctx context.Context, x T)             {}
func tpfn2[T1, T2 any](ctx context.Context, x T1, y T2) {}

func tpbar() {
	tpfn1[int](context.TODO(), 0) //@ diag(`do not pass a nil Context`)
	tpfn1(context.TODO(), 0)      //@ diag(`do not pass a nil Context`)

	tpfn2[int, int](context.TODO(), 0, 0) //@ diag(`do not pass a nil Context`)
	tpfn2(context.TODO(), 0, 0)           //@ diag(`do not pass a nil Context`)
}
