jaredly / jaredly/jerd

Fails to type check annotated code

Open
#7 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
37
Forks
1
PR merge metrics
No merged PRs in 30d

Description

Here is an example of the code:

```ts
type Just = {
x: T
}
enum Maybe {
None,
Just
}

const delta = (a:int, b:int):Maybe => {
if a == b {
None
} else {
Just{x: b - a}
}
}
```

Screen Shot 2021-03-27 at 12 39 37 AM

image

Only thing that seems to works is

image

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the type-checking failure with the annotated TypeScript example in the issue and compare it with the working form shown in the final image. Trace the type-checking entry point and identify the change needed for the example to type-check successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.