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
description: `generic <${genericTypeId}> with existing range "${ParameterPropertyHandlerRange.rangeToDisplayString(existingRange,this)}" can not contain the given value`,
96
+
context: { existingRange, value },
97
+
causes: [subConflict],
98
+
};
99
+
}
88
100
}
89
101
90
102
// Infer type of value
91
103
constvalueRange=this.inferValueRange(value);
92
104
if(!valueRange){
93
-
returntrue;
105
+
return;
94
106
}
95
107
96
108
// Save inferred type
@@ -106,24 +118,31 @@ export class GenericsContext {
106
118
publicbindGenericTypeToRange(
107
119
genericTypeId: string,
108
120
range: Resource,
109
-
): boolean{
121
+
): IParamValueConflict|undefined{
110
122
// Fail if an unknown generic type is referenced
111
123
if(!(genericTypeIdinthis.genericTypeIds)){
112
-
returnfalse;
124
+
return{
125
+
description: `unknown generic <${genericTypeId}> is being referenced`,
description: `generic <${genericTypeId}> with existing range "${ParameterPropertyHandlerRange.rangeToDisplayString(this.bindings[genericTypeId],this)}" can not be bound to range "${ParameterPropertyHandlerRange.rangeToDisplayString(range,this)}"`,
135
+
context: {
136
+
existingRange: this.bindings[genericTypeId],
137
+
newRange: range,
138
+
},
139
+
};
120
140
}
121
141
122
142
range=mergedRange;
123
143
}
124
144
125
145
this.bindings[genericTypeId]=range;
126
-
returntrue;
127
146
}
128
147
129
148
/**
@@ -249,12 +268,14 @@ export class GenericsContext {
0 commit comments