Introduce rules to say that missing formal parameter type means dynamic #2163
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The language specification definition of function declarations in section 'Function Declarations' has not been updated for a long time. Unfortunately, the definition is inconsistent with the usage of that phrase elsewhere in the spec. With this PR, we're consistently considering a function declaration as a broad concept (e.g., it includes constructors, operators, getters, and external functions).
With a consistently broad definition of function declarations in place, this PR then introduces the rule (in section 'Formal Parameters') that an omitted type annotation on a formal parameter yields the declared type
dynamic
, and also mentions that the declared type isn't omitted if it is provided by override inference.