Skip to content

arrays as constant #179

@Thomas008

Description

@Thomas008

While using constants of simple types as integers and strings works fine, using constans of an array yields to warnings when compiling. It results in an executable, but it is faulty and stops when trying to run.
Here is an example:

const a = mfill(m"", 2)
const a[1] = m"a"
const a[2] = m"b"

function f()
  if a[1] == m"a"
    printf(c"equal")
  end
  printf(c"end")
  0
end

compile_executable(f, (), "C:\\jul\\staticcompiler")

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