File tree Expand file tree Collapse file tree 2 files changed +21
-14
lines changed Expand file tree Collapse file tree 2 files changed +21
-14
lines changed Original file line number Diff line number Diff line change @@ -1929,6 +1929,27 @@ SourceLoc OptionalAdjustment::getOptionalityLoc(TypeRepr *tyR) const {
1929
1929
return SourceLoc ();
1930
1930
}
1931
1931
1932
+ namespace {
1933
+ // / Describes the position for optional adjustment made to a witness.
1934
+ // /
1935
+ // / This is used by the following diagnostics:
1936
+ // / 1) 'err_protocol_witness_optionality',
1937
+ // / 2) 'warn_protocol_witness_optionality'
1938
+ // / 3) 'protocol_witness_optionality_conflict'
1939
+ enum class OptionalAdjustmentPosition : unsigned {
1940
+ // / The type of a variable.
1941
+ VarType = 0 ,
1942
+ // / The result type of something.
1943
+ Result = 1 ,
1944
+ // / The parameter type of something.
1945
+ Param = 2 ,
1946
+ // / The parameter types of something.
1947
+ MultipleParam = 3 ,
1948
+ // / Both return and parameter adjustments.
1949
+ ParamAndReturn = 4 ,
1950
+ };
1951
+ } // namespace
1952
+
1932
1953
// / Classify the provided optionality issues for use in diagnostics.
1933
1954
static OptionalAdjustmentPosition classifyOptionalityIssues (
1934
1955
const SmallVectorImpl<OptionalAdjustment> &adjustments,
Original file line number Diff line number Diff line change @@ -347,20 +347,6 @@ class OptionalAdjustment {
347
347
SourceLoc getOptionalityLoc (TypeRepr *tyR) const ;
348
348
};
349
349
350
- // / Describes the position for optional adjustment made to a witness
351
- enum class OptionalAdjustmentPosition : unsigned {
352
- // / The type of a variable.
353
- VarType = 0 ,
354
- // / The result type of something.
355
- Result = 1 ,
356
- // / The parameter type of something.
357
- Param = 2 ,
358
- // / The parameter types of something.
359
- MultipleParam = 3 ,
360
- // / Both return and parameter adjustments.
361
- ParamAndReturn = 4 ,
362
- };
363
-
364
350
// / Describes a match between a requirement and a witness.
365
351
struct RequirementMatch {
366
352
RequirementMatch (ValueDecl *witness, MatchKind kind,
You can’t perform that action at this time.
0 commit comments