Tensegritics / Tensegritics/ClojureDart
Loose type inference on functions that are type hinted
Open
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 1.6k
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Description
When type hinting a function and using it, compiler looses all type inference informations. Spend some type debugging it but it should probably go into the bigger fn refactor.
(defn baptiste [^#/(String -> int) fff]
(let [b (fff "one")]
b))
Generates
dc.dynamic baptiste(dc.dynamic fff$1, ){
final dc.dynamic b$1=(fff$1 as dc.int Function(dc.String, ))("one", );
return b$1;
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce issue 307 with the baptiste example and compare its generated Dart output with the expected inferred types. Trace how the String -> int function type hint is handled during compilation, then verify that the generated function call and local value retain the intended types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure, dart
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100