Skip to content

Multi-level Type aliasing produces "unknown error" in input field of Morphir web #1116

@emmaodametey

Description

@emmaodametey

Describe the bug
Type aliasing a concrete type on multiple levels does not define the type in the input field of morphir web. When a type alias; "CustomA" references a basic type "Int", the basic type is displayed in the input section of Morphir web as the type of that input parameter but when another type alias "Custom B" references Custom A, the type represented in the input section of the Morphir web is "?" and "unknown error" is displayed when any input is typed in.

To Reproduce
Steps to reproduce the behavior:

  1. Define the following Elm model:
type alias CustomA =
    Int
type alias CustomB =
    CustomA
type alias Foo =
    { works : Int
    , worksToo : CustomA
    , bug : CustomB
    }
 
funct1 : Foo-> Foo
funct1 foo =
    foo
 
funct2 : CustomB -> CustomB
funct2 customB =
    customB

  1. Navigate to funt1 function in the UI and fill in the input values
  2. Check the type annotated for works and worksToo in the Foo record on Morphir Web
  3. Notice that it's Int
  4. Check the type annotated for bug in the Foo record on Morphir Web
  5. Notice that it's "?" and not Int
  6. Notice that attempting to input a value into bug field throws "unknown error"
  7. funct2 behaves similarly

image

Expected behavior
The type for the bug field in record Foo should be represented as Int because the base type is an Int

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome
  • Version : 2.86.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    taskTask level project item

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions