Skip to content

Commit 718cfdd

Browse files
authored
Fix a bug where the wrong module was used for identity comparisons (#949)
1 parent 67c4e1b commit 718cfdd

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

lib/src/async_environment.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,10 @@ class AsyncEnvironment {
276276
var view = ForwardedModuleView(module, rule);
277277
for (var other in _forwardedModules) {
278278
_assertNoConflicts(
279-
view.variables, other.variables, module, other, "variable", rule);
279+
view.variables, other.variables, view, other, "variable", rule);
280280
_assertNoConflicts(
281-
view.functions, other.functions, module, other, "function", rule);
282-
_assertNoConflicts(
283-
view.mixins, other.mixins, module, other, "mixin", rule);
281+
view.functions, other.functions, view, other, "function", rule);
282+
_assertNoConflicts(view.mixins, other.mixins, view, other, "mixin", rule);
284283
}
285284

286285
// Add the original module to [_allModules] (rather than the
@@ -315,8 +314,9 @@ class AsyncEnvironment {
315314

316315
for (var name in smaller.keys) {
317316
if (!larger.containsKey(name)) continue;
318-
if (newModule.variableIdentity(name) ==
319-
oldModule.variableIdentity(name)) {
317+
if (type == "variable" &&
318+
newModule.variableIdentity(name) ==
319+
oldModule.variableIdentity(name)) {
320320
continue;
321321
}
322322

lib/src/environment.dart

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// DO NOT EDIT. This file was generated from async_environment.dart.
66
// See tool/grind/synchronize.dart for details.
77
//
8-
// Checksum: 6666522945667f7f041530ee545444b7b40cfc80
8+
// Checksum: 90df4751419f38332128857f9e02d481cbd7e5a7
99
//
1010
// ignore_for_file: unused_import
1111

@@ -283,11 +283,10 @@ class Environment {
283283
var view = ForwardedModuleView(module, rule);
284284
for (var other in _forwardedModules) {
285285
_assertNoConflicts(
286-
view.variables, other.variables, module, other, "variable", rule);
286+
view.variables, other.variables, view, other, "variable", rule);
287287
_assertNoConflicts(
288-
view.functions, other.functions, module, other, "function", rule);
289-
_assertNoConflicts(
290-
view.mixins, other.mixins, module, other, "mixin", rule);
288+
view.functions, other.functions, view, other, "function", rule);
289+
_assertNoConflicts(view.mixins, other.mixins, view, other, "mixin", rule);
291290
}
292291

293292
// Add the original module to [_allModules] (rather than the
@@ -322,8 +321,9 @@ class Environment {
322321

323322
for (var name in smaller.keys) {
324323
if (!larger.containsKey(name)) continue;
325-
if (newModule.variableIdentity(name) ==
326-
oldModule.variableIdentity(name)) {
324+
if (type == "variable" &&
325+
newModule.variableIdentity(name) ==
326+
oldModule.variableIdentity(name)) {
327327
continue;
328328
}
329329

0 commit comments

Comments
 (0)