Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
clean up
  • Loading branch information
christopherfujino committed Dec 9, 2022
commit c80400677591a206beabf39de7b0493537302dd3
12 changes: 6 additions & 6 deletions tools/const_finder/test/const_finder_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,18 @@ void _checkConsts(String dillPath, Compiler compiler) {
if (compiler == Compiler.aot) {
expectation['nonConstantLocations'] = <Object?>[];
} else {
// Without true tree-shaking, there is a non-const reference in a
// never-invoked function that will be present in the dill.
final String fixturesUrl = Platform.isWindows
? '/$fixtures'.replaceAll(Platform.pathSeparator, '/')
: fixtures;

// Without true tree-shaking, there is a non-const reference in a
// never-invoked function that will be present in the dill.
expectation['nonConstantLocations'] = <Object?>[
<String, dynamic>{
'file': 'file://$fixturesUrl/pkg/package.dart',
'line': 14,
'column': 25,
},
'file': 'file://$fixturesUrl/pkg/package.dart',
'line': 14,
'column': 25,
},
];
}
expectInstances(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import 'target.dart';
void main() {
Targets.used1.hit();
Targets.used2.hit();
final Target used3 = helper(Target.new);
used3.hit();
final Target nonConstUsed3 = helper(Target.new);
nonConstUsed3.hit();
}

Target helper(Target Function(String, int, Target?) tearOff) {
Expand Down