Skip to content

[Bug] Nested arrays throw error when used with n>1 elements #737

Description

@Luna-Klatzer

Is there an existing issue for this?

  • I have searched the existing issues

I am following the documentation's guide

  • I have read the documentation

This issue exists in the latest version

  • I am using the latest version

Current Behavior

The following statement throws an error due to mismatching types (which should be only thrown with v0.12.1 for unsupported type unions):

const a: Array< Array<num> > = [ [1,2,3,4], [2,3,4,5] ];

Compiler Output:

File 'anonymous-script', line 1, col 31:
  const a: Array< Array<num> > = [ [1,2,3,4], [2,3,4,5] ];
                                 ^^^^^^^^^^^^^^^^^^^^^^^^ 
NotImplementedError: Arrays with multiple types of elements are not implemented yet. Update Kipper or watch out for future releases.

Related to another nested array issue as described in #736.

Expected Behavior

The nested children arrays should be recognised as Array<num> and the parent array should be correctly identified as the type Array<Array<num>>.

Steps To Reproduce

  1. Use nested array with n>1 elements such as [ [1,2,3,4], [2,3,4,5] ];

Environment

  • Kipper: 0.12.1

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugBug or issue in the language or API

Type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions