File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -2905,8 +2905,9 @@ class _InstanceCreationEvaluator {
2905
2905
String ? variableName =
2906
2906
argumentCount < 1 ? null : firstArgument? .toStringValue ();
2907
2907
if (definingClass == typeProvider.boolElement) {
2908
- // Special case: https://github.com/dart-lang/sdk/issues/50045
2909
- if (variableName == 'dart.library.js_util' ) {
2908
+ // Special cases: https://github.com/dart-lang/sdk/issues/50045
2909
+ if (variableName == 'dart.library.js_util' ||
2910
+ variableName == 'dart.library.js_interop' ) {
2910
2911
return DartObjectImpl (
2911
2912
typeSystem,
2912
2913
typeProvider.boolType,
Original file line number Diff line number Diff line change @@ -6050,6 +6050,18 @@ bool true
6050
6050
''' );
6051
6051
}
6052
6052
6053
+ /// See https://github.com/dart-lang/sdk/issues/50045
6054
+ test_bool_fromEnvironment_dartLibraryJsInterop () async {
6055
+ await assertNoErrorsInCode ('''
6056
+ const a = bool.fromEnvironment('dart.library.js_interop');
6057
+ ''' );
6058
+ var result = _topLevelVar ('a' );
6059
+ assertDartObjectText (result, '''
6060
+ <unknown> bool
6061
+ variable: <testLibrary>::@topLevelVariable::a
6062
+ ''' );
6063
+ }
6064
+
6053
6065
/// See https://github.com/dart-lang/sdk/issues/50045
6054
6066
test_bool_fromEnvironment_dartLibraryJsUtil () async {
6055
6067
await assertNoErrorsInCode ('''
You can’t perform that action at this time.
0 commit comments