Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copyWith: false is ignored by deep copy #747

Closed
nikitadol opened this issue Aug 30, 2022 · 1 comment · Fixed by #810
Closed

copyWith: false is ignored by deep copy #747

nikitadol opened this issue Aug 30, 2022 · 1 comment · Fixed by #810
Labels
bug Something isn't working

Comments

@nikitadol
Copy link

Describe the bug

error: Undefined class '$TestEnumCopyWith'. (undefined_class at [bug] lib/freezed_bug.freezed.dart:32)
error: Undefined class '$TestEnumCopyWith'. (undefined_class at [bug] lib/freezed_bug.freezed.dart:56)
error: The method '$TestEnumCopyWith' isn't defined for the type '_$TestModelCopyWithImpl'. (undefined_method at [bug] lib/freezed_bug.freezed.dart:57)
error: Undefined class '$TestEnumCopyWith'. (undefined_class at [bug] lib/freezed_bug.freezed.dart:72)

To Reproduce

import 'package:freezed_annotation/freezed_annotation.dart';

part 'freezed_bug.freezed.dart';

@freezed
class TestModel with _$TestModel {
  const factory TestModel({
    required TestEnum testEnum,
  }) = _TestModel;
}

@Freezed(copyWith: false)
class TestEnum with _$TestEnum {
  const factory TestEnum._({
    required int testNum,
  }) = _TestEnum;
}
@nikitadol nikitadol added bug Something isn't working needs triage labels Aug 30, 2022
@rrousselGit rrousselGit changed the title copyWith: false is ignored by the generator in other classes copyWith: false is ignored by deep copy Sep 27, 2022
@CartmanGD
Copy link

Facing the same issue... referring to my StackOverflow question

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants