Skip to content

Commit a3a263c

Browse files
authored
Update pattern test to account for new DDC JS variable naming
A bug recently uncovered in DDC required renaming some variables (primarily around patterns) to avoid declarations from shadowing each other incorrectly. 'a' is now 'a$' as it is the second case that declares a Dart variable named 'a'.
1 parent ab620d1 commit a3a263c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

dwds/test/instances/common/patterns_inspection_common.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ void runTests({
9898

9999
expect(await getFrameVariables(frame), {
100100
'obj': matchListInstance(type: 'Object'),
101-
'a': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'),
102-
'n': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14),
101+
// Renamed to avoid shadowing variables from previous case.
102+
'a\$': matchPrimitiveInstance(kind: InstanceKind.kString, value: 'b'),
103+
'n\$': matchPrimitiveInstance(kind: InstanceKind.kDouble, value: 3.14),
103104
});
104105
});
105106
});

0 commit comments

Comments
 (0)