Skip to content

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

@TDRRmk2

Description

@TDRRmk2

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions