dart-lang / dart-lang/language
String? test(int? foo) {} should be error?
Open
request
- Dominant language
- TeX
- Stars
- 2.9k
- Forks
- 239
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 14
Description
the code is ok, but foo must put a argument, String? also must return a explict value?
```dart
void main(List args) {
print(test(null));
}
String? test(int? foo) {
// this should explictly return null?
}
```
Contributor guide
Research direction
Start with the Dart snippet in main and the test function, then examine the language rules for nullable parameters and return values. Done means a resolved specification decision stating whether this code should be accepted and what explicit-return behavior is required.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100