Skip to content

LogicStructure Example in User Guide doesn't compile #578

@awmoore-intel

Description

@awmoore-intel

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentationgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions