Remove const array formatting

This commit is contained in:
Sofia 2026-04-16 20:01:30 +03:00
parent 53872373bf
commit 28be145a70
2 changed files with 2 additions and 4 deletions

View File

@ -162,9 +162,7 @@ namespace types {
std::string ArrayType::formatted() { std::string ArrayType::formatted() {
std::stringstream out{ "" }; std::stringstream out{ "" };
if (this->m_const) // Arrays are always constant, no reason to format it.
out << "const[] ";
out << this->m_inner->formatted(); out << this->m_inner->formatted();
out << "[" << this->m_size << "]"; out << "[" << this->m_size << "]";
return out.str(); return out.str();

2
test.c
View File

@ -6,7 +6,7 @@ int fibonacci(int n) {
return fibonacci(n - 1) + fibonacci(n - 2); return fibonacci(n - 1) + fibonacci(n - 2);
} }
void change_first(char* otus) { void change_first(char otus[5]) {
otus[0] = 115; otus[0] = 115;
} }