Skip to content

Commit 57dc071

Browse files
gmackallGray Mackall
and
Gray Mackall
authored
Adding 'is' to list of kotlin reserved keywords (#116299)
Co-authored-by: Gray Mackall <[email protected]>
1 parent de2a424 commit 57dc071

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/flutter_tools/lib/src/template.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import 'dart/package_map.dart';
1717
/// They are escaped in Kotlin files.
1818
///
1919
/// https://kotlinlang.org/docs/keyword-reference.html
20-
const List<String> kReservedKotlinKeywords = <String>['when', 'in'];
20+
const List<String> kReservedKotlinKeywords = <String>['when', 'in', 'is'];
2121

2222
/// Expands templates in a directory to a destination. All files that must
2323
/// undergo template expansion should end with the '.tmpl' extension. All files

packages/flutter_tools/test/general.shard/android/template_test.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ void main() {
3636
);
3737

3838
final Map<String, Object> context = <String, Object>{
39-
'androidIdentifier': 'in.when.there',
39+
'androidIdentifier': 'is.in.when.there',
4040
};
4141
template.render(destination, context);
4242

4343
final File destinationFile = destination.childFile(outputClass);
44-
expect(destinationFile.readAsStringSync(), equals('package `in`.`when`.there;'));
44+
expect(destinationFile.readAsStringSync(), equals('package `is`.`in`.`when`.there;'));
4545
});
4646

4747
}

0 commit comments

Comments
 (0)