Fix the KCL any type and array coercion incorrectly nesting (#6816)
* Add sim test for any type * Fix doc comments to match code * Add array ascription tests * Commit new test output * Fix to not panic when type is undefined * Fix to not panic on use of the any type * Update test and generated output * Fix error message after rebase * Fix subtype of any * Fix KCL to use new keyword args * Fix to not nest MixedArray in HomArray * Update output * Remove all creation of MixedArray and use HomArray instead * Rename MixedArray to Tuple * Fix to coerce arrays the way tuples are done * Restructure to appease the type signature extraction * Fix TS unit test * Update output after switch to HomArray * Update docs * Fix to remove edge case when creating points * Update docs with broken point signature * Fix display of tuples to not collide with arrays * Change push to an array with type mismatch to be an error * Add sim test for push type error * Fix acription to more general array element type * Fix to coerce point types * Change array push to not error when item type differs * Fix coercion tests * Change to only flatten as a last resort and remove flattening tuples * Contort code to appease doc generation * Update docs * Fix coerce axes * Fix flattening test to test arrays instead of tuples * Remove special subtype case for singleton coercion
This commit is contained in:
		@ -29,7 +29,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "dodecFaces": {
 | 
			
		||||
    "type": "MixedArray",
 | 
			
		||||
    "type": "HomArray",
 | 
			
		||||
    "value": [
 | 
			
		||||
      {
 | 
			
		||||
        "type": "Solid",
 | 
			
		||||
@ -2194,10 +2194,10 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
    ]
 | 
			
		||||
  },
 | 
			
		||||
  "faceRotations": {
 | 
			
		||||
    "type": "MixedArray",
 | 
			
		||||
    "type": "HomArray",
 | 
			
		||||
    "value": [
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
@ -2254,7 +2254,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
@ -2311,7 +2311,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
@ -2368,7 +2368,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
@ -2425,7 +2425,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
@ -2482,7 +2482,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
@ -2539,7 +2539,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
@ -2596,7 +2596,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
@ -2653,7 +2653,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
@ -2710,7 +2710,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
@ -2767,7 +2767,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
@ -2824,7 +2824,7 @@ description: Variables in memory after executing dodecahedron.kcl
 | 
			
		||||
        ]
 | 
			
		||||
      },
 | 
			
		||||
      {
 | 
			
		||||
        "type": "MixedArray",
 | 
			
		||||
        "type": "HomArray",
 | 
			
		||||
        "value": [
 | 
			
		||||
          {
 | 
			
		||||
            "type": "Number",
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user