dart-lang / dart-lang/language

implicit-dynamic: false, anonymous functions, and explicitly dynamic types require gratuitous verbosity in code

Open
#993 4 comments 11 reactions 0 assignees View on GitHub
request
Dominant language
TeX
Stars
2.9k
Forks
239
Avg merge
2d 18h
Merged PRs (30d)
14

Description

Supporting the generation of code that's compliant with `implicit-dynamic: false` is is a BIG request for json_serializable

https://github.com/dart-lang/json_serializable/issues/557

The VAST majority of the cases in generate code map to something like this

image.png
![image](https://user-images.githubusercontent.com/17034/83188304-55299e80-a0e4-11ea-9302-16a80b61e601.png)

error: Missing parameter type for 'e'. (implicit_dynamic_parameter at [json_serializable] test/kitchen_sink/kitchen_sink.g_exclude_null__non_nullable.g.dart:117)

`e` in this case maps back to something explicitly dynamic. Adding explicit `dynamic` here seems silly and redundant.

Is there some deeper logic here I'm missing? Could we update this error?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.