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: function definition is not allowed here #10

Closed
edfink234 opened this issue Feb 28, 2023 · 2 comments
Closed

error: function definition is not allowed here #10

edfink234 opened this issue Feb 28, 2023 · 2 comments

Comments

@edfink234
Copy link

edfink234 commented Feb 28, 2023

I tried to enter the following function

void func(int x) noexcept(false)
{
    if (x > 10)
    {
        throw 1;	
    }
}

but it gives the error in the title of this issue:

Compilation error:
input_line_11:3:1: error: function definition is not allowed here
{
^
@SdtElectronics
Copy link
Owner

SdtElectronics commented Mar 1, 2023

Seems to be a bug in Cling. I can reproduce this in ROOT 6.24/06, and the Cling used by the Cline in service was build upon root-project/cling@1d5536f. No related commits were found in the upstream after that, so presumably the problem is still there. I reported it at root-project/cling#490 and I'll keep this issue open till it is confirmed by the Cling maintainers.

@SdtElectronics
Copy link
Owner

Closing as problem has been confirmed from the upstream. See root-project/root#11265 for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants