-
Notifications
You must be signed in to change notification settings - Fork 134
Adding diagnostic message when using TypeVar improperly #1230
Adding diagnostic message when using TypeVar improperly #1230
Conversation
src/Analysis/Ast/Impl/Specializations/Typing/Types/GenericTypeParameter.cs
Outdated
Show resolved
Hide resolved
…ring, moving tests to new file, adding more tests
src/Analysis/Ast/Impl/Specializations/Typing/Types/GenericTypeParameter.cs
Outdated
Show resolved
Hide resolved
src/Analysis/Ast/Impl/Specializations/Typing/Types/GenericTypeParameter.cs
Outdated
Show resolved
Hide resolved
src/Analysis/Ast/Impl/Specializations/Typing/Types/GenericTypeParameter.cs
Outdated
Show resolved
Hide resolved
src/Analysis/Ast/Impl/Specializations/Typing/Types/GenericTypeParameter.cs
Outdated
Show resolved
Hide resolved
src/Analysis/Ast/Impl/Specializations/Typing/Types/GenericTypeParameter.cs
Outdated
Show resolved
Hide resolved
…led with an ArgumentSet that has no context
After more thought, should leave this PR for now. We have the current issue:
Currently, bound is seen as a second parameter to TypeVar, which we flag as a bad type because (in our example) 'Comparator' is a string value and not the string type which is required. For an example look at test |
Delayed until #1263 merges. |
…into scratch/GenericTypeNoArguments
return !string.IsNullOrEmpty(typeString) ? argSet.Eval.GetTypeFromString(typeString) : a.GetPythonType(); | ||
}).ToArray() ?? Array.Empty<IPythonType>(); | ||
|
||
if (constraints.Any(c => c.IsUnknown())) { |
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.
Some constraints can be valid but still unknown, probably not worth reporting.
No description provided.