Tensegritics / Tensegritics/ClojureDart
Type inference on destructuring headers with http
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 1.6k
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When destructuring the headers of a http response the error appears:
Performing hot reload...
lib/cljd-out/acme/main.dart:39:19: Error: 'K' isn't a type.
late final dc.Map<K, V> map$8746_$2;
^
lib/cljd-out/acme/main.dart:39:22: Error: 'V' isn't a type.
late final dc.Map<K, V> map$8746_$2;
To Reproduce
Steps to reproduce the behavior:
- clone the repo 'https://github.com/ianffcs/response-header-destructuring-error-repro'
- clj -M:cljd init
- clj -M:cljd flutter
Expected behavior
It would be possible to println the access-control-allow-headers from the response when button clicked.
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
Clone the linked response-header-destructuring-error-repro repository and run clj -M:cljd init followed by clj -M:cljd flutter to reproduce the generated Dart error in lib/cljd-out/acme/main.dart at line 39. Trace the destructuring and HTTP response type-inference path; done means the K and V errors disappear and the access-control-allow-headers value can be printed when the button is clicked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- compilers, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100