Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 2 additions & 4 deletions source_gen/lib/src/constants/revive.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// TODO(kevmoo): migrate analyzer APIs when we can get latest with a stable SDK
// ignore_for_file: deprecated_member_use

import 'package:analyzer/dart/constant/value.dart';
import 'package:analyzer/dart/element/element2.dart';
import 'package:analyzer/dart/element/type.dart';
Expand Down Expand Up @@ -82,9 +79,10 @@ Revivable reviveInstance(DartObject object, [LibraryElement2? origin]) {
final i = (object as DartObjectImpl).getInvocation();
if (i != null) {
url = Uri.parse(urlOfElement(i.constructor2.enclosingElement2));
String newToEmpty(String string) => string == 'new' ? '' : string;
final result = Revivable._(
source: url,
accessor: i.constructor.name,
accessor: newToEmpty(i.constructor2.name3!),
namedArguments: i.namedArguments,
positionalArguments: i.positionalArguments,
);
Expand Down
2 changes: 1 addition & 1 deletion source_gen/test/generator_for_annotation_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ class _TestingResolver implements ReleasableResolver {
}

@override
Future<LibraryElement2> libraryFor2(
Future<LibraryElement2> libraryFor(
AssetId assetId, {
bool allowSyntaxErrors = false,
}) async {
Expand Down