C#: Do not extract type annotations that can be deduced. Put specific_type_parameter_annotation on the side of specific_type_parameter_constraints.

This commit is contained in:
Calum Grant
2019-06-19 12:12:10 +01:00
parent 31655c22f1
commit f9099653a6
13 changed files with 6118 additions and 2325 deletions

View File

@@ -485,8 +485,6 @@ type_mention_location(
* A direct annotation on an entity, for example `string? x;`.
*
* Annotations:
* 0 = reftype nullability is not applicable
* 1 = reftype nullability disabled
* 2 = reftype is not annotated "!"
* 3 = reftype is annotated "?"
* 4 = readonly ref type / in parameter
@@ -501,9 +499,6 @@ type_mention_location(
*/
type_annotation(int id: @has_type_annotation ref, int annotation: int ref);
/** The annotation of the callable's receiver. */
receiver_type_annotation(int callable: @callable ref, int annotation: int ref);
/** The annotation of type arguments of a constructed type or method. */
type_argument_annotation(int constructedgeneric: @generic ref, int position: int ref, int annotation: int ref);
@@ -547,9 +542,12 @@ general_type_parameter_constraints(
specific_type_parameter_constraints(
int id: @type_parameter_constraints ref,
int base_id: @type_or_ref ref,
int nullability: int ref);
int base_id: @type_or_ref ref);
specific_type_parameter_annotation(
int id: @type_parameter_constraints ref,
int base_id: @type_or_ref ref,
int annotation: int ref);
/** MODIFIERS */