Tensegritics / Tensegritics/ClojureDart

cljd type parameter inference on static methods could be better

Open
#299 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
1.6k
Forks
119
PR merge metrics
No merged PRs in 30d

Description

(def color (let [a (-> m/MaterialStateProperty (. #/(all m/Color) m/Colors.white) )]
            a))

will generate:

 final f_material.MaterialStateProperty<dc.dynamic> a$1=(f_material.MaterialStateProperty.all<f_material.Color>(f_material.Colors.white, ));

Varaible a$1 should be defined with its type parameter

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start with the issue's Clojure reproducer and trace type inference for the static call to MaterialStateProperty.all; compare the inferred type with the generated Dart declaration. Done means the generated variable preserves the inferred Color type parameter instead of using dynamic.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure, dart, flutter
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.