Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Conversation

@MikhailArkhipov
Copy link

Fixes #1291

  • Make sure we do not try and create specific type for non-generics
  • Cache specific types so we don't create many Foo[Unknown]
  • Fix minor issue when generic type matching didn't work b/c we didn't count self.

MikhailArkhipov added 2 commits July 11, 2019 14:05
Do not create specific types for non-generics
foreach (var m in members) {
switch (m.Value) {
case IPythonTemplateType tt: {
case IPythonTemplateType tt when tt.IsGeneric(): {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing when, see similar care below


// For still undefined parameters try matching passed types in order
for (var i = 0; i < args.Arguments.Count; i++) {
for (int i = 0, gtIndex = 0; i < args.Arguments.Count; i++) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parameter index does not always equal generic parameter index (consider self)

Copy link
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM if the the full suite ends up passing.

@MikhailArkhipov MikhailArkhipov merged commit 4a26142 into microsoft:master Jul 12, 2019
@MikhailArkhipov MikhailArkhipov deleted the 1291 branch July 12, 2019 06:24
jakebailey pushed a commit to jakebailey/python-language-server that referenced this pull request Nov 1, 2019
…crosoft#1316)

* Test

* Cache specific types
Do not create specific types for non-generics
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stuck at analyzing in background and causing high cpu load

2 participants