Adding 'is' to list of kotlin reserved keywords (#116299)

Co-authored-by: Gray Mackall <mackall@google.com>
This commit is contained in:
gmackall
2023-01-05 16:10:07 -08:00
committed by GitHub
parent de2a42497f
commit 57dc071f79
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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;'));
});
}