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

error 100: function prototypes do not match #982

Open
stas11s11t opened this issue Jul 27, 2024 · 1 comment
Open

error 100: function prototypes do not match #982

stas11s11t opened this issue Jul 27, 2024 · 1 comment
Labels
compiler Problems with the compiler parsing source code. enhancement

Comments

@stas11s11t
Copy link

typeset T
{
	function void (int a);
	function void (int a, int b);
}

native void N(T t);

public void OnPluginStart()
{
	bool b = true;
	N(b ? A : B); // error 100: function prototypes do not match
}

public void A(int a)
{

}

public void B(int a, int b)
{

}

This is inconvenient and you are forced to do:

if (b) {
	N(B);
} else {
	N(A);
}
@peace-maker peace-maker added bug compiler Problems with the compiler parsing source code. labels Jul 27, 2024
@dvander dvander added enhancement and removed bug labels Nov 29, 2024
@dvander
Copy link
Member

dvander commented Nov 29, 2024

Looks like this doesn't work in 1.11 so relabeling as an enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler Problems with the compiler parsing source code. enhancement
Projects
None yet
Development

No branches or pull requests

3 participants