Skip to content

Commit

Permalink
Adding 'is' to list of kotlin reserved keywords (flutter#116299)
Browse files Browse the repository at this point in the history
Co-authored-by: Gray Mackall <[email protected]>
  • Loading branch information
gmackall and Gray Mackall authored Jan 6, 2023
1 parent de2a424 commit 57dc071
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/flutter_tools/lib/src/template.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import 'dart/package_map.dart';
/// They are escaped in Kotlin files.
///
/// https://kotlinlang.org/docs/keyword-reference.html
const List<String> kReservedKotlinKeywords = <String>['when', 'in'];
const List<String> kReservedKotlinKeywords = <String>['when', 'in', 'is'];

/// Expands templates in a directory to a destination. All files that must
/// undergo template expansion should end with the '.tmpl' extension. All files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ void main() {
);

final Map<String, Object> context = <String, Object>{
'androidIdentifier': 'in.when.there',
'androidIdentifier': 'is.in.when.there',
};
template.render(destination, context);

final File destinationFile = destination.childFile(outputClass);
expect(destinationFile.readAsStringSync(), equals('package `in`.`when`.there;'));
expect(destinationFile.readAsStringSync(), equals('package `is`.`in`.`when`.there;'));
});

}

0 comments on commit 57dc071

Please sign in to comment.