enable to create an explicitly typed empty array

e.g.
    a := [] : [int] # Create an empty int array
add tests for bd2e398
fix error layout for codegen error