You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you have two classes with the same name but different packages (e.g. Timer from dart:async and a custom class) freezed will use just one of those classes for both types resulting in a compile time error.
To Reproduce
Create a class that has a conflicting name:
class Timer { }
Create a freezed class that uses both conflicting classes:
I would expect that the corresponding freezed part class uses the same aliased class name (async.Timer). But it uses the un-aliased class name resulting in a compile time error since the constructor signatures don't match.
Part of the generated code:
/// @nodocmixin_$TimerState {
Map<Timer, Timer> get timerNotifications =>throw _privateConstructorUsedError;
@JsonKey(ignore:true)
$TimerStateCopyWith<TimerState> get copyWith =>throw _privateConstructorUsedError;
}
The text was updated successfully, but these errors were encountered:
Describe the bug
If you have two classes with the same name but different packages (e.g. Timer from dart:async and a custom class) freezed will use just one of those classes for both types resulting in a compile time error.
To Reproduce
Create a class that has a conflicting name:
class Timer { }
Create a freezed class that uses both conflicting classes:
Run the freezed generator.
Expected behavior
I would expect that the corresponding freezed part class uses the same aliased class name (async.Timer). But it uses the un-aliased class name resulting in a compile time error since the constructor signatures don't match.
Part of the generated code:
The text was updated successfully, but these errors were encountered: