Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Functions taking array references error if they're unused #16

Open
TDRRmk2 opened this issue Aug 7, 2021 · 0 comments
Open

Functions taking array references error if they're unused #16

TDRRmk2 opened this issue Aug 7, 2021 · 0 comments

Comments

@TDRRmk2
Copy link

TDRRmk2 commented Aug 7, 2021

Not sure if I explained that right, but basically, if a function that takes an array reference isn't used anywhere, the compiler will error out with this:
"internal error: asked to update dimension information, but shared array is not allocated"
As soon as any usage of the function is added, it'll compile just fine.

Take this code for example:

#library "TEST"
#import "zcommon.bcs"

void TestBug (int[]& array)
{
	int len = array[0];
} 

private int testArray[1];

Script 1 (void)
{
	//TestBug(testArray);
}

It errors out as it is, but uncomment the TestBug(testArray); line and it'll compile fine.
This happens on the (as of writing) latest commit d58b44d, but not the 0.8.0 build.

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

No branches or pull requests

1 participant