-
Notifications
You must be signed in to change notification settings - Fork 17
fix: resolve inheritance hiding and covariant array warnings #9046
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
base: dev
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,10 @@ | ||
| using System.Collections.Generic; | ||
|
|
||
| namespace DCL.Communities.CommunitiesDataProvider.DTOs | ||
| { | ||
| public interface ICommunityMemberPagedResponse | ||
| { | ||
| ICommunityMemberData[] members { get; } | ||
| IReadOnlyList<ICommunityMemberData> members { get; } | ||
| int total { get; } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -8,7 +8,6 @@ public class ToggleWithIconAndCheckContextMenuControlSettings : ToggleContextMen | |||||||||
| { | ||||||||||
| internal readonly ToggleGroup toggleGroup; | ||||||||||
| internal readonly Sprite icon; | ||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compile error (CS0191): Same issue as
Suggested change
|
||||||||||
| internal readonly Color iconColor; | ||||||||||
|
|
||||||||||
| /// <summary> | ||||||||||
| /// Settings for a toggle control that includes a checkmark and an optional icon. | ||||||||||
|
|
@@ -29,4 +28,4 @@ public ToggleWithIconAndCheckContextMenuControlSettings( | |||||||||
| this.iconColor = iconColor == default ? Color.white : iconColor; | ||||||||||
| } | ||||||||||
| } | ||||||||||
| } | ||||||||||
| } | ||||||||||
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,8 +5,6 @@ namespace DCL.UI.Controls.Configs | |||||||
| { | ||||||||
| public class ToggleWithIconContextMenuControlSettings : ToggleContextMenuControlSettings | ||||||||
| { | ||||||||
| internal readonly Sprite toggleIcon; | ||||||||
|
|
||||||||
| public ToggleWithIconContextMenuControlSettings(Sprite toggleIcon, string toggleText, Action<bool> toggleAction, RectOffset horizontalLayoutPadding = null, int horizontalLayoutSpacing = 30, | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Compile error (CS0191): Removing The correct fix to suppress the CS0108 warning without breaking the build is:
Suggested change
Alternatively, change the base-constructor call to the overload that accepts : base(toggleText, toggleAction, toggleIcon, horizontalLayoutPadding, horizontalLayoutSpacing, horizontalLayoutReverseArrangement)but that is a behavioural change (base-class field would become non-null) and is out of scope for a warning-cleanup PR. |
||||||||
| bool horizontalLayoutReverseArrangement = false) : base(toggleText, toggleAction, horizontalLayoutPadding, horizontalLayoutSpacing, horizontalLayoutReverseArrangement) | ||||||||
| { | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compile error (CS1061): Removing
TrimmedWearableDTO TrimmedDTO { get; }means the default methodIsSmart()now resolvesTrimmedDTOto the baseITrimmedAvatarAttachment.TrimmedDTO, which has return typeTrimmedAvatarAttachmentDTO. That abstract base class has nometadatafield (only the generic subclassTrimmedAvatarAttachmentDTO<TMetadata>does), soTrimmedDTO.metadata.isSmartfails with CS1061.The fix that's consistent with how
ITrimmedEmotewas corrected is to keep the re-declaration but mark it explicit withnew:Apply this suggestion only after restoring the declaration above it:
i.e., the full corrected block: