-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Labels
bugenhancementAn enhancement or new featureAn enhancement or new featuregood first issueShould be easier for first time contributorsShould be easier for first time contributorshelp welcomeCould use help from communityCould use help from communitylanguage
Description
Describe the issue
Dart's new Null Safety language feature introduces some new keywords and a new way to specify types:
-
lateandrequiredare new keywords -
Neveris a new type found indart:core -
(almost) all types can be suffixed with a
?to indicate a nullable type. For example, in:f(int x) { ... } g(int? x) { ... }
fis a function which accepts a non-nullintparameter, andgaccepts a nullableintparameter.
Which language seems to have the issue?
Dart.
Are you using highlight or highlightAuto?
Either.
Sample Code to Reproduce
late int x;
f({required int? y}) {}
const List<Never> z = [];Expected behavior
late and required should be highlighted as keywords. int? should highlight the same as int. Never should be highlighted like the other built-in types.
Additional context
Metadata
Metadata
Assignees
Labels
bugenhancementAn enhancement or new featureAn enhancement or new featuregood first issueShould be easier for first time contributorsShould be easier for first time contributorshelp welcomeCould use help from communityCould use help from communitylanguage