File tree Expand file tree Collapse file tree
utbot-python/src/main/kotlin/org/utbot/python/newtyping Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ class VarDefinition(
6969class ExpressionTypeFromMypy (
7070 val startOffset : Long ,
7171 val endOffset : Long ,
72+ val line : Long ,
7273 val type : MypyAnnotation
7374)
7475
@@ -99,6 +100,9 @@ class MypyAnnotationStorage(
99100 initAnnotation(it.annotation)
100101 }
101102 }
103+ types.values.flatten().forEach {
104+ initAnnotation(it.type)
105+ }
102106 nodeStorage.values.forEach { node ->
103107 node.storage = this
104108 node.children.forEach { initAnnotation(it) }
@@ -128,7 +132,7 @@ class MypyAnnotation(
128132 )
129133 }
130134 return origin
131- }
135+ }
132136}
133137
134138sealed class PythonAnnotationNode {
@@ -247,7 +251,7 @@ class TypeVarNode(
247251 get() = super .children + values + (upperBound?.let { listOf (it) } ? : emptyList())
248252 override fun initializeType () =
249253 error(" Initialization of TypeVar must be done in defining class or function." +
250- " TypeVar name: $varName , def_id: $def " )
254+ " TypeVar name: $varName , def_id: $def " )
251255 val constraints: Set <TypeParameterConstraint > by lazy {
252256 val upperBoundConstraint: Set <TypeParameterConstraint > =
253257 upperBound?.let { setOf (TypeParameterConstraint (upperBoundRelation, it.asUtBotType)) } ? : emptySet()
You can’t perform that action at this time.
0 commit comments