Skip to content

Commit 27049dd

Browse files
stereotype441tvolkert
authored andcommitted
Switch to new-style mixins so that super.noSuchMethod can be called. (#117)
The ability for a class used as a mixin to call super has been removed from Dart, but due to an analyzer bug some usages slipped through the cracks. The analyzer bug has now been fixed, so we need a corresponding fix to package:file. The solution is to change the mixin classes to use the new "mixin" syntax.
1 parent a198745 commit 27049dd

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

packages/file/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
#### 5.0.7
2+
3+
* Dart 2 fixes for `RecordingProxyMixin` and `ReplayProxyMixin`.
4+
15
#### 5.0.6
26

37
* Dart 2 fixes for `RecordingFile.open()`

packages/file/lib/src/backends/record_replay/recording_file_system_entity.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import 'recording_proxy_mixin.dart';
1919
/// [FileSystemEntity] implementation that records all invocation activity to
2020
/// its file system's recording.
2121
abstract class RecordingFileSystemEntity<T extends FileSystemEntity>
22-
extends RecordingProxyMixin implements FileSystemEntity {
22+
extends Object with RecordingProxyMixin implements FileSystemEntity {
2323
/// Creates a new `RecordingFileSystemEntity`.
2424
RecordingFileSystemEntity(this.fileSystem, this.delegate) {
2525
methods.addAll(<Symbol, Function>{

packages/file/lib/src/backends/record_replay/recording_proxy_mixin.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ import 'result_reference.dart';
6363
/// Methods that return [Stream]s will be recorded immediately, but their
6464
/// return values will be recorded as a [List] that will grow as the stream
6565
/// produces data.
66-
abstract class RecordingProxyMixin implements ProxyObject, ReplayAware {
66+
mixin RecordingProxyMixin on Object implements ProxyObject, ReplayAware {
6767
/// Maps method names to delegate functions.
6868
///
6969
/// Invocations of methods listed in this map will be recorded after

packages/file/lib/src/backends/record_replay/replay_io_sink.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import 'replay_proxy_mixin.dart';
1313

1414
/// [IOSink] implementation that replays all invocation activity from a prior
1515
/// recording.
16-
class ReplayIOSink extends ReplayProxyMixin implements IOSink {
16+
class ReplayIOSink extends Object with ReplayProxyMixin implements IOSink {
1717
final ReplayFileSystemImpl _fileSystem;
1818

1919
/// Creates a new [ReplayIOSink].

packages/file/lib/src/backends/record_replay/replay_proxy_mixin.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ int _nextOrdinal = 0;
4343
/// Foo sampleParent;
4444
/// }
4545
///
46-
/// class ReplayFoo extends ReplayProxyMixin implements Foo {
46+
/// class ReplayFoo extends Object with ReplayProxyMixin implements Foo {
4747
/// final List<Map<String, dynamic>> manifest;
4848
/// final String identifier;
4949
///
@@ -58,7 +58,7 @@ int _nextOrdinal = 0;
5858
/// });
5959
/// }
6060
/// }
61-
abstract class ReplayProxyMixin implements ProxyObject, ReplayAware {
61+
mixin ReplayProxyMixin on Object implements ProxyObject, ReplayAware {
6262
/// Maps method names to [Converter]s that will revive result values.
6363
///
6464
/// Invocations of methods listed in this map will be replayed by looking for

packages/file/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: file
2-
version: 5.0.6
2+
version: 5.0.7
33
authors:
44
- Matan Lurey <[email protected]>
55
- Yegor Jbanov <[email protected]>

0 commit comments

Comments
 (0)