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 · 0 comments
Open

error 100: function prototypes do not match #982

stas11s11t opened this issue Jul 27, 2024 · 0 comments
Labels
bug compiler Problems with the compiler parsing source code.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug compiler Problems with the compiler parsing source code.
Projects
None yet
Development

No branches or pull requests

2 participants