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
For Python class TypeDecl nodes that inherit from generic classes, Joern does not recognize the inherited class when it is specialized. This is the case for both the inheritedTypeFullName and baseType fields.
To Reproduce
Create analysis test:
generic.py
import typing
T = typing.TypeVar("T")
class GenericFoo(typing.Generic[T]):
pass
class SomeMixin(object):
pass
class IntFoo(GenericFoo[int], SomeMixin):
pass
For this example, GenericFoo is not recognized as an inherited class of IntFoo. In other examples, I have observed e.g., "GenericFoo[int]" listed in the inheritedTypeFullName field, but without recognizing that "GenericFoo[int]" is the same class as "GenericFoo".
Expected behavior
The inheritedTypeFullName and baseType fields list "GenericFoo" as an inherited class of IntFoo.
Desktop (please complete the following information):
OS: Debian 12
Joern Version: 2.0.385
Java version: 19.0.2
Additional context
I know I am on an outdated version of Joern, but on the most up-to-date build I cannot get a CPG to load when analyzing Python projects. I do not see any recent commit messages related to this, but I apologize if this is a recently fixed issue.
The text was updated successfully, but these errors were encountered:
Describe the bug
For Python class TypeDecl nodes that inherit from generic classes, Joern does not recognize the inherited class when it is specialized. This is the case for both the
inheritedTypeFullName
andbaseType
fields.To Reproduce
generic.py
For this example,
GenericFoo
is not recognized as an inherited class ofIntFoo
. In other examples, I have observed e.g.,"GenericFoo[int]"
listed in theinheritedTypeFullName
field, but without recognizing that"GenericFoo[int]"
is the same class as"GenericFoo"
.Expected behavior
The
inheritedTypeFullName
andbaseType
fields list"GenericFoo"
as an inherited class ofIntFoo
.Desktop (please complete the following information):
Additional context
I know I am on an outdated version of Joern, but on the most up-to-date build I cannot get a CPG to load when analyzing Python projects. I do not see any recent commit messages related to this, but I apologize if this is a recently fixed issue.
The text was updated successfully, but these errors were encountered: