rohd icon indicating copy to clipboard operation
rohd copied to clipboard

LogicStructure Example in User Guide doesn't compile

Open awmoore-intel opened this issue 8 months ago • 1 comments

Describe the bug

This gives an error:

 Error: Undefined name 'MyStruct'.
      MyStruct._(Logic(name: 'ready'), Logic(name: 'valid'));
      ^^^^^^^^
class ReadyValidStruct extends LogicStructure {
  final Logic ready;
  final Logic valid;

  factory ReadyValidStruct() => MyStruct._(
        Logic(name: 'ready'),
        Logic(name: 'valid'),
      );

  ReadyValidStruct._(this.ready, this.valid)
      : super([ready, valid], name: 'readyValid');

  @override
  LogicStructure clone({String? name}) => ReadyValidStruct();
}

To Reproduce

No response

Expected behavior

No response

Actual behavior

No response

Additional: Dart SDK info

No response

Additional: pubspec.yaml


Additional: Context

No response

awmoore-intel avatar Mar 05 '25 05:03 awmoore-intel

Indeed! Thank you for reporting!

mkorbel1 avatar Mar 05 '25 06:03 mkorbel1