-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).Dart language related items (some items might be better tracked at github.com/dart-lang/language).type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
This issue was originally filed by [email protected]
What steps will reproduce the problem?
Type the following in try-dart-lang.appspot.com:
num foo() {
print('Hello, world!');
}
main() {
foo();
}
Or, even more egregiously:
num foo() {
print('Hello, world!');
}
main() {
num result = foo();
}
What is the expected output? What do you see instead?
Since the declaration of foo() promises to return an object of type 'num', there should, at the very least, be a warning triggered as a result of the lack of return. Ideally this would be an error.
Please provide any additional information below.
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work onarea-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).Dart language related items (some items might be better tracked at github.com/dart-lang/language).type-enhancementA request for a change that isn't a bugA request for a change that isn't a bug