Skip to content

Commit 0d4c54d

Browse files
authored
Prepare for separation of ClassElement, EnumElement and MixinElement. (#617)
* Prepare for separation of ClassElement, EnumElement and MixinElement. * Throw explicitly.
1 parent bd6f791 commit 0d4c54d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source_gen/lib/src/constants/revive.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Revivable reviveInstance(DartObject object, [LibraryElement? origin]) {
4444
);
4545
}
4646

47-
if (element is ClassElement) {
47+
if (element is InterfaceElement) {
4848
for (final e in element.fields.where(
4949
(f) => f.isPublic && f.isConst && f.computeConstantValue() == object,
5050
)) {

source_gen/test/generator_for_annotation_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ class _TestingResolver implements ReleasableResolver {
197197
bool allowSyntaxErrors = false,
198198
}) async {
199199
resolvedLibs.add(assetId);
200-
return null as LibraryElement;
200+
throw StateError('This method intentionally throws');
201201
}
202202

203203
@override

0 commit comments

Comments
 (0)