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

Call target resolving incorrect from call sites with nested generic parameters #508

Open
objeck opened this issue Jan 13, 2025 · 0 comments
Assignees
Labels

Comments

@objeck
Copy link
Owner

objeck commented Jan 13, 2025

The following code was resolved incorrectly due to a missing check for nested generic types. Note that the Complete function is heavily overloaded in this example.

function : Complete(model : String, message : Pair<String, ImageQuery>, token : String) ~ Completion {
	messages := Vector->New()<Pair<String, ImageQuery>>;
	messages->AddBack(message);
	
	// resolved to incorrect call target
	return Complete(model, messages, -1, -1.0, -1.0, token);
}

Wrong call target

function : Complete(model : String, messages : Vector<Pair<String, String>>, max_tokens : Int, temperature : Float, top_p : Float, token : String) ~ Completion;

Right call target

function : Complete(model : String, messages : Vector<Pair<String, ImageQuery>>, max_tokens : Int, temperature : Float, top_p : Float, token : String) ~ Completion {
@objeck objeck added the bug label Jan 13, 2025
@objeck objeck self-assigned this Jan 13, 2025
objeck added a commit that referenced this issue Jan 13, 2025
objeck added a commit that referenced this issue Jan 13, 2025
objeck added a commit that referenced this issue Jan 13, 2025
objeck added a commit that referenced this issue Jan 13, 2025
objeck added a commit that referenced this issue Jan 13, 2025
objeck added a commit that referenced this issue Jan 13, 2025
objeck added a commit that referenced this issue Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant