Skip to content

Conversation

@rodiazet
Copy link
Contributor

This PR adds additional check in TypeChecker for IndexAccess which ensures that the array size is not 0.
As a result of this change, type which is an empty array of contracts is also forbidden.

Fixes #13652.

@rodiazet rodiazet requested review from cameel and nikola-matic and removed request for nikola-matic January 23, 2026 15:42
@stackenbotten3000
Copy link

There was an error when running chk_coding_style for commit aa31d42a9b1c270b3d5024b70e97d60c34f33da8:

Coding style error:
libsolidity/analysis/TypeChecker.cpp:26:#include "DeclarationTypeChecker.h"

Please check that your changes are working as intended.


#include <libsolidity/analysis/TypeChecker.h>

#include "DeclarationTypeChecker.h"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style error

@stackenbotten3000
Copy link

There was an error when running chk_coding_style for commit 12c94081a054bcce42ac0aa36bf24a9360ee4bcc:

Coding style error:
libsolidity/analysis/TypeChecker.cpp:26:#include "DeclarationTypeChecker.h"

Please check that your changes are working as intended.


#include <libsolidity/analysis/TypeChecker.h>

#include "DeclarationTypeChecker.h"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coding style error

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

Successfully merging this pull request may close these issues.

zero-length array types in expression context do not raise type errors

3 participants