Tensegritics / ClojureDart

Clojure dialect for Flutter and Dart
1.38k stars 88 forks source link

Type inference on destructuring headers with http #313

Open ianffcs opened 1 month ago

ianffcs commented 1 month ago

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:

  1. clone the repo 'https://github.com/ianffcs/response-header-destructuring-error-repro'
  2. clj -M:cljd init
  3. clj -M:cljd flutter

Expected behavior It would be possible to println the access-control-allow-headers from the response when button clicked.

dupuchba commented 4 weeks ago

Hey @ianffcs , i'll try to take a look tonight, ping me tomorrow if I forgot