-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(MustBePartialAnalyzer): check ancestry for partial
- Loading branch information
Showing
14 changed files
with
190 additions
and
125 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
...ices.Tests/UnitTests/Analyzers/MustBePartialAnalyzerTests.ReportsDiagnostics.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[ | ||
(7,15): error FXKIT0001: The type 'ForgotToAddPartial' must be partial in order to use it with 'Union' | ||
(6,15): error FXKIT0001: The type 'ForgotToAddPartial' must be partial in order to use it with 'Union' | ||
] |
4 changes: 4 additions & 0 deletions
4
...nalyzers/MustBePartialAnalyzerTests.ReportsWhenTypeHierarchyIsMissingPartial.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[ | ||
(6,14): error FXKIT0001: The type 'Super' must be partial in order to use it with 'Union', | ||
(8,18): error FXKIT0001: The type 'Duper' must be partial in order to use it with 'Union' | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...es.Tests/UnitTests/Analyzers/UnionAnalyzerTests.ReportsForInvalidConstituent.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[ | ||
(9,12): error FXKIT0003: Use 'partial record Woah' to declare a constituent of union type 'ForgotToAddPartial' | ||
(8,12): error FXKIT0003: Use 'partial record Woah' to declare a constituent of union type 'ForgotToAddPartial' | ||
] |
2 changes: 1 addition & 1 deletion
2
...s.Tests/UnitTests/Analyzers/UnionAnalyzerTests.ReportsForMissingConstituents.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[ | ||
(7,23): warning FXKIT0002: The type 'MissingConstituents' is marked as [Union] and should declare at least one nested 'partial record' | ||
(6,23): warning FXKIT0002: The type 'MissingConstituents' is marked as [Union] and should declare at least one nested 'partial record' | ||
] |
2 changes: 1 addition & 1 deletion
2
...rvices.Tests/UnitTests/Analyzers/UnionAnalyzerTests.ReportsForNonClosedUsage.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[ | ||
(12,32): error FXKIT0004: 'NonClosedUsage' inherits union type 'NonClosed' which is not allowed. Only declare constituents by nesting them inside of the union using 'partial record'. | ||
(11,32): error FXKIT0004: 'NonClosedUsage' inherits union type 'NonClosed' which is not allowed. Only declare constituents by nesting them inside of the union using 'partial record'. | ||
] |
4 changes: 2 additions & 2 deletions
4
...es.Tests/UnitTests/Analyzers/UnionAnalyzerTests.ReportsWhenDeclaringBaseType.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[ | ||
(15,58): error FXKIT0007: 'HaseBaseTypeButItDoesntEvenCompile' is marked as a union and therefore is not allowed to inherit from other types, | ||
(9,36): error FXKIT0007: 'HaseBaseType' is marked as a union and therefore is not allowed to inherit from other types | ||
(14,58): error FXKIT0007: 'HaseBaseTypeButItDoesntEvenCompile' is marked as a union and therefore is not allowed to inherit from other types, | ||
(8,36): error FXKIT0007: 'HaseBaseType' is marked as a union and therefore is not allowed to inherit from other types | ||
] |
2 changes: 1 addition & 1 deletion
2
...nitTests/Analyzers/UnionAnalyzerTests.ReportsWhenDeclaringPrimaryConstructor.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
[ | ||
(7,30): error FXKIT0005: 'HasCtor' is marked as a union and cannot declare a primary constructor | ||
(6,30): error FXKIT0005: 'HasCtor' is marked as a union and cannot declare a primary constructor | ||
] |
4 changes: 2 additions & 2 deletions
4
...ts/UnitTests/Analyzers/UnionAnalyzerTests.ReportsWhenInvalidModifiersAreUsed.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[ | ||
(13,16): error FXKIT0006: 'IsAbstract' is marked as a union and cannot be marked as abstract because unions will be automatically marked as abstract, | ||
(7,16): error FXKIT0006: 'IsSealed' is marked as a union and cannot be marked as sealed because unions will be automatically marked as abstract | ||
(12,16): error FXKIT0006: 'IsAbstract' is marked as a union and cannot be marked as abstract because unions will be automatically marked as abstract, | ||
(6,16): error FXKIT0006: 'IsSealed' is marked as a union and cannot be marked as sealed because unions will be automatically marked as abstract | ||
] |
1 change: 1 addition & 0 deletions
1
...tTests/Analyzers/UnionAnalyzerTests.ReportsWhenTypeHierarchyIsMissingPartial.received.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
1 change: 1 addition & 0 deletions
1
...tTests/Analyzers/UnionAnalyzerTests.ReportsWhenTypeHierarchyIsMissingPartial.verified.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.