Skip to content

Commit f8f5dc7

Browse files
authored
Fix overly specific cast, prepare to release v1.2.4 (#621)
1 parent 1b2a99b commit f8f5dc7

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

source_gen/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.2.4
2+
3+
* Fix overly-specific cast.
4+
15
## 1.2.3
26

37
* Require `analyzer: '>=4.6.0 <6.0.0'`

source_gen/lib/src/constants/reader.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ class _DartObjectConstant extends ConstantReader {
271271
ConstantReader read(String field) {
272272
final reader = peek(field);
273273
if (reader == null) {
274-
assertHasField(objectValue.type?.element2 as ClassElement, field);
274+
assertHasField(objectValue.type!.element2 as InterfaceElement, field);
275275
return const _NullConstant();
276276
}
277277
return reader;

source_gen/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: source_gen
2-
version: 1.2.3
2+
version: 1.2.4
33
description: >-
44
Source code generation builders and utilities for the Dart build system
55
repository: https://github.com/dart-lang/source_gen

0 commit comments

Comments
 (0)