Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
emmaodametey opened this issue Nov 28, 2023 · 0 comments
Labels
task Task level project item

Comments

@emmaodametey
Copy link

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
@emmaodametey emmaodametey added the task Task level project item label Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Task level project item
Projects
None yet
Development

No branches or pull requests

1 participant