Repository navigation
Exclude unreachable antecedents from code flow complexity - #11806
crypt0lith wants to merge 4 commits into
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
/benchmark |
This comment has been minimized.
This comment has been minimized.
🟢 Pyright CLI QA —
|
_finishFlowLabel counts unreachable antecedents toward a label's code flow complexity, although code flow analysis never traverses them. When the truthiness of an operand of a binary logical operator is evaluated statically, the operand adds one, which can push a function over the complexity limits for return type inference. Count only reachable antecedents.
d11c639 to
262ef8f
Compare
Rich Chiodo (rchiodo)
left a comment
There was a problem hiding this comment.
This looks like a good complexity change. Could we add a few more controls to callSite5.py?
The current func(a, b) test has four b = b or {} lines before return a, and checks reveal_type(func(1, None), expected_text='Literal[1]'). That test would still pass if complexity counting were accidentally removed altogether.
With the same function shape, eight b = b or {} lines or four b = b or a lines reveal Unknown on both base and head. Four b = b and [] lines or four b = 0 or b lines reveal Unknown on base and Literal[1] on head. Could we add boundary and dynamic controls and one of the and or static-left variants? That would cover cases that stay Unknown as well as another form that benefits from the change.
Also, the comment in binder.ts says analysis never traverses unreachable antecedents. The flow engine does encounter them, but terminates immediately and uses flags to distinguish reachability reasons. They stay in the graph and don't add further paths. Could we clarify the wording? I don't think the graph needs to change.
|
The inference fix reproduces on current |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Diff from mypy_primer, showing the effect of this PR on open source code: sympy (https://github.com/sympy/sympy)
+ .../projects/sympy/sympy/core/exprtools.py:776:25 - error: Argument of type "One | Zero | Unknown | Expr" cannot be assigned to parameter "value" of type "bytes" in function "__setitem__"
+ Type "One | Zero | Unknown | Expr" is not assignable to type "bytes"
+ "Expr" is not assignable to "bytes" (reportArgumentType)
+ .../projects/sympy/sympy/core/tests/test_expr.py:1382:52 - error: "expand" is not a known attribute of "None" (reportOptionalMemberAccess)
+ .../projects/sympy/sympy/core/tests/test_expr.py:1384:60 - error: "expand" is not a known attribute of "None" (reportOptionalMemberAccess)
- 38184 errors, 83 warnings, 0 informations
+ 38187 errors, 83 warnings, 0 informations
zope.interface (https://github.com/zopefoundation/zope.interface)
- .../projects/zope.interface/src/zope/interface/common/tests/__init__.py:31:22 - error: Cannot access attribute "dependents" for class "_InterfaceClassWithCustomMethods*"
+ .../projects/zope.interface/src/zope/interface/common/tests/__init__.py:31:22 - error: Cannot access attribute "dependents" for class "<subclass of ABCInterfaceClass and _InterfaceClassWithCustomMethods>"
- .../projects/zope.interface/src/zope/interface/common/tests/__init__.py:31:22 - error: Cannot access attribute "dependents" for class "InterfaceClass*"
+ .../projects/zope.interface/src/zope/interface/common/tests/__init__.py:31:22 - error: Cannot access attribute "dependents" for class "InterfaceClass"
+ .../projects/zope.interface/src/zope/interface/interface.py:739:44 - error: Argument of type "Any | _InterfaceClassWithCustomMethods | InterfaceClass | Self@InterfaceClass | type[Self@InterfaceClass]" cannot be assigned to parameter "cls" of type "type[Self@object]" in function "__new__"
+ Type "Any | _InterfaceClassWithCustomMethods | InterfaceClass | Self@InterfaceClass | type[Self@InterfaceClass]" is not assignable to type "type[Self@object]" (reportArgumentType)
- .../projects/zope.interface/src/zope/interface/interface.py:989:11 - error: Cannot assign to attribute "_calculate_sro" for class "_InterfaceClassWithCustomMethods*"
+ .../projects/zope.interface/src/zope/interface/interface.py:989:11 - error: Cannot assign to attribute "_calculate_sro" for class "_InterfaceClassWithCustomMethods"
- Attribute "_calculate_sro" is unknown (reportAttributeAccessIssue)
- .../projects/zope.interface/src/zope/interface/interface.py:989:11 - error: Cannot assign to attribute "_calculate_sro" for class "InterfaceClass*"
- .../projects/zope.interface/src/zope/interface/interface.py:990:11 - error: Cannot access attribute "changed" for class "_InterfaceClassWithCustomMethods*"
+ .../projects/zope.interface/src/zope/interface/interface.py:990:11 - error: Cannot access attribute "changed" for class "_InterfaceClassWithCustomMethods"
- Attribute "changed" is unknown (reportAttributeAccessIssue)
- .../projects/zope.interface/src/zope/interface/interface.py:990:11 - error: Cannot access attribute "changed" for class "InterfaceClass*"
- .../projects/zope.interface/src/zope/interface/interface.py:991:18 - error: Cannot access attribute "__sro__" for class "_InterfaceClassWithCustomMethods*"
+ .../projects/zope.interface/src/zope/interface/interface.py:991:18 - error: Cannot access attribute "__sro__" for class "_InterfaceClassWithCustomMethods"
- Attribute "__sro__" is unknown (reportAttributeAccessIssue)
- .../projects/zope.interface/src/zope/interface/interface.py:991:18 - error: Cannot access attribute "__sro__" for class "InterfaceClass*"
- Expression of type "_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass" cannot be assigned to attribute "_ROOT" of class "Specification"
+ Expression of type "Any | _InterfaceClassWithCustomMethods | InterfaceClass" cannot be assigned to attribute "_ROOT" of class "Specification"
- Type "_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass" is not assignable to type "None"
+ Type "Any | _InterfaceClassWithCustomMethods | InterfaceClass" is not assignable to type "None"
- "InterfaceClass*" is not assignable to "None" (reportAttributeAccessIssue)
+ "InterfaceClass" is not assignable to "None" (reportAttributeAccessIssue)
- .../projects/zope.interface/src/zope/interface/tests/test_adapter.py:1575:33 - error: Argument of type "list[_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass]" cannot be assigned to parameter "iterable" of type "Iterable[SupportsRichComparisonT(1)@sorted]" in function "sorted"
+ .../projects/zope.interface/src/zope/interface/tests/test_adapter.py:1575:33 - error: Argument of type "list[Any | _InterfaceClassWithCustomMethods | InterfaceClass]" cannot be assigned to parameter "iterable" of type "Iterable[SupportsRichComparisonT(1)@sorted]" in function "sorted"
- Type "_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass" is not assignable to type "SupportsRichComparison"
+ Type "Any | _InterfaceClassWithCustomMethods | InterfaceClass" is not assignable to type "SupportsRichComparison"
- Type "_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass" is not assignable to type "SupportsRichComparison"
+ Type "Any | _InterfaceClassWithCustomMethods | InterfaceClass" is not assignable to type "SupportsRichComparison"
- Type "InterfaceClass*" is not assignable to type "SupportsRichComparison"
+ Type "InterfaceClass" is not assignable to type "SupportsRichComparison"
- "InterfaceClass*" is incompatible with protocol "SupportsDunderLT[Any]"
+ "InterfaceClass" is incompatible with protocol "SupportsDunderLT[Any]"
- "InterfaceClass*" is incompatible with protocol "SupportsDunderGT[Any]"
+ "InterfaceClass" is incompatible with protocol "SupportsDunderGT[Any]"
- Type "_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass" is not assignable to type "SupportsRichComparison" (reportArgumentType)
+ Type "Any | _InterfaceClassWithCustomMethods | InterfaceClass" is not assignable to type "SupportsRichComparison" (reportArgumentType)
- .../projects/zope.interface/src/zope/interface/tests/test_adapter.py:1579:33 - error: Argument of type "list[_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass]" cannot be assigned to parameter "iterable" of type "Iterable[SupportsRichComparisonT(1)@sorted]" in function "sorted"
+ .../projects/zope.interface/src/zope/interface/tests/test_adapter.py:1579:33 - error: Argument of type "list[Any | _InterfaceClassWithCustomMethods | InterfaceClass]" cannot be assigned to parameter "iterable" of type "Iterable[SupportsRichComparisonT(1)@sorted]" in function "sorted"
- Type "_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass" is not assignable to type "SupportsRichComparison"
+ Type "Any | _InterfaceClassWithCustomMethods | InterfaceClass" is not assignable to type "SupportsRichComparison"
- Type "_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass" is not assignable to type "SupportsRichComparison"
+ Type "Any | _InterfaceClassWithCustomMethods | InterfaceClass" is not assignable to type "SupportsRichComparison"
- Type "InterfaceClass*" is not assignable to type "SupportsRichComparison"
+ Type "InterfaceClass" is not assignable to type "SupportsRichComparison"
- "InterfaceClass*" is incompatible with protocol "SupportsDunderLT[Any]"
+ "InterfaceClass" is incompatible with protocol "SupportsDunderLT[Any]"
- "InterfaceClass*" is incompatible with protocol "SupportsDunderGT[Any]"
+ "InterfaceClass" is incompatible with protocol "SupportsDunderGT[Any]"
- Type "_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass" is not assignable to type "SupportsRichComparison" (reportArgumentType)
+ Type "Any | _InterfaceClassWithCustomMethods | InterfaceClass" is not assignable to type "SupportsRichComparison" (reportArgumentType)
- Expression of type "list[_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass]" cannot be assigned to attribute "_provided" of class "Registry"
+ Expression of type "list[Any | _InterfaceClassWithCustomMethods | InterfaceClass]" cannot be assigned to attribute "_provided" of class "Registry"
- "list[_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass]" is not assignable to "tuple[Unknown, ...]" (reportAttributeAccessIssue)
+ "list[Any | _InterfaceClassWithCustomMethods | InterfaceClass]" is not assignable to "tuple[Unknown, ...]" (reportAttributeAccessIssue)
- .../projects/zope.interface/src/zope/interface/tests/test_adapter.py:1638:33 - error: Argument of type "list[_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass]" cannot be assigned to parameter "iterable" of type "Iterable[SupportsRichComparisonT(1)@sorted]" in function "sorted"
+ .../projects/zope.interface/src/zope/interface/tests/test_adapter.py:1638:33 - error: Argument of type "list[Any | _InterfaceClassWithCustomMethods | InterfaceClass]" cannot be assigned to parameter "iterable" of type "Iterable[SupportsRichComparisonT(1)@sorted]" in function "sorted"
- Type "_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass" is not assignable to type "SupportsRichComparison"
+ Type "Any | _InterfaceClassWithCustomMethods | InterfaceClass" is not assignable to type "SupportsRichComparison"
- Type "_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass" is not assignable to type "SupportsRichComparison"
+ Type "Any | _InterfaceClassWithCustomMethods | InterfaceClass" is not assignable to type "SupportsRichComparison"
- Type "InterfaceClass*" is not assignable to type "SupportsRichComparison"
+ Type "InterfaceClass" is not assignable to type "SupportsRichComparison"
- "InterfaceClass*" is incompatible with protocol "SupportsDunderLT[Any]"
+ "InterfaceClass" is incompatible with protocol "SupportsDunderLT[Any]"
- "InterfaceClass*" is incompatible with protocol "SupportsDunderGT[Any]"
+ "InterfaceClass" is incompatible with protocol "SupportsDunderGT[Any]"
- Type "_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass" is not assignable to type "SupportsRichComparison" (reportArgumentType)
+ Type "Any | _InterfaceClassWithCustomMethods | InterfaceClass" is not assignable to type "SupportsRichComparison" (reportArgumentType)
... (truncated 388 lines) ...
apprise (https://github.com/caronc/apprise)
+ .../projects/apprise/apprise/plugins/office365.py:1067:29 - error: Argument of type "Unknown | Any | None" cannot be assigned to parameter "x" of type "ConvertibleToInt" in function "__new__"
+ Type "Unknown | Any | None" is not assignable to type "ConvertibleToInt"
+ Type "None" is not assignable to type "ConvertibleToInt"
+ "None" is not assignable to "str"
+ "None" is incompatible with protocol "Buffer"
+ "__buffer__" is not present
+ "None" is incompatible with protocol "SupportsInt"
+ "__int__" is not present
+ "None" is incompatible with protocol "SupportsIndex"
+ ... (reportArgumentType)
+ .../projects/apprise/apprise/plugins/office365.py:1067:29 - error: Argument of type "Unknown | Any | None" cannot be assigned to parameter "x" of type "ConvertibleToInt" in function "__new__"
+ Type "Unknown | Any | None" is not assignable to type "ConvertibleToInt"
+ Type "None" is not assignable to type "ConvertibleToInt"
+ "None" is not assignable to "str"
+ "None" is incompatible with protocol "Buffer"
+ "__buffer__" is not present
+ "None" is incompatible with protocol "SupportsInt"
+ "__int__" is not present
+ "None" is incompatible with protocol "SupportsIndex" (reportArgumentType)
+ .../projects/apprise/apprise/plugins/office365.py:1108:29 - error: Argument of type "Unknown | Any | None" cannot be assigned to parameter "x" of type "ConvertibleToInt" in function "__new__"
+ Type "Unknown | Any | None" is not assignable to type "ConvertibleToInt"
+ Type "None" is not assignable to type "ConvertibleToInt"
+ "None" is not assignable to "str"
+ "None" is incompatible with protocol "Buffer"
+ "__buffer__" is not present
+ "None" is incompatible with protocol "SupportsInt"
+ "__int__" is not present
+ "None" is incompatible with protocol "SupportsIndex"
+ ... (reportArgumentType)
+ .../projects/apprise/apprise/plugins/office365.py:1108:29 - error: Argument of type "Unknown | Any | None" cannot be assigned to parameter "x" of type "ConvertibleToInt" in function "__new__"
+ Type "Unknown | Any | None" is not assignable to type "ConvertibleToInt"
+ Type "None" is not assignable to type "ConvertibleToInt"
+ "None" is not assignable to "str"
+ "None" is incompatible with protocol "Buffer"
+ "__buffer__" is not present
+ "None" is incompatible with protocol "SupportsInt"
+ "__int__" is not present
+ "None" is incompatible with protocol "SupportsIndex" (reportArgumentType)
- 7151 errors, 18 warnings, 0 informations
+ 7155 errors, 18 warnings, 0 informations
|
|
Compared candidate Release history charts were not rendered for this run. See the workflow run for details. Type checker benchmark🟢 No performance regressions detected. Regression threshold:
Pyright stats
|
mypy_primer analysisAdvisory AI analysis of primer run 44845175822, attempt 1 Regression review required. Potential regressions or recorded warning signals are listed first; causation must be established separately. Potential regressionssympy: Lowering the flow-complexity gate newly analyzes three call sites, surfacing an Expr-to-bytes write and two possible-None .expand calls; whether those paths are genuinely reachable remains unverified.Regression warning signals require review, regardless of the AI assessment:
AI assessment: Needs human review (medium confidence). PR attribution: Likely caused by the PR. Before / baseline evidence: The baseline emitted no headers at exprtools.py:776 or test_expr.py:1382/1384. This does not establish a precise baseline type, only that these argument and optional-member checks were not reported. The recorded artifact does not include surrounding baseline reveals or the exact SymPy checkout revision. After / PR evidence: At exprtools.py:776:25, the value assigned through __setitem__ is now inferred as One | Zero | Unknown | Expr and rejected against bytes. At test_expr.py:1382:52 and 1384:60, .expand is now checked on a value that includes None, producing reportOptionalMemberAccess. The gradual-detail signal is the Expr-containing assignability explanation, not evidence that the whole value became Unknown. Why this matters: Users can no longer rely on these formerly silent paths type-checking: dictionary-like writes now require excluding Expr/Unknown from a bytes value, and the two test expressions require proving non-None before .expand. This may restore useful checking, but could be a false positive if call-site inference failed to preserve a branch invariant or overload relationship. Causal analysis: The PR changes Binder flow complexity from all label antecedents to only antecedents not marked UnreachableStructural or UnreachableStaticCondition. That can move an unannotated function below Pyright's complexity cutoff, enabling call-site return inference where the baseline skipped it. The added regression sample explicitly demonstrates this path: repeated `b = b or {}` creates statically unreachable edges, but the call must still infer Literal[1]. The three SymPy-only additions are consistent with newly inferred return/value types feeding existing assignment and optional-member checks. This is likely caused by the PR, but the raw artifact lacks the enclosing functions and exact ecosystem revision, so it is not yet possible to determine whether the newly retained None/Expr branches are correct or an inference regression. No assertion failure or complete type erasure was recorded; Unknown appears as one union member while concrete alternatives remain. Uncertainty / next check: Resolve the exact SymPy checkout and inspect the producers used at exprtools.py:776 and test_expr.py:1382/1384. A minimal control should keep the same repeated falsy-flow pattern, then compare a definitely-bytes/non-None call with a call that can return Expr/None; the former should pass and the latter should retain the new errors.
zope.interface: Call-site inference now widens synthesized interface-class results with Any and drops four registry assignment errors, so invalid writes and member/call misuse may no longer be reliably rejected.Regression warning signals require review, regardless of the AI assessment:
AI assessment: Possible regression (medium confidence). PR attribution: Likely caused by the PR. Before / baseline evidence: Across interface.py and declarations.py, baseline detail lines described synthesized `_InterfaceClassWithCustomMethods* | InterfaceClass* | InterfaceClass` values and emitted separate member/call diagnostics for retained alternatives. In test_registry.py:2785, 2801, 2990, and 3006, assigning object to typed `provided` attributes produced assignment errors. These are observed baseline diagnostics; the asterisk semantics are checker display metadata, not runtime types. After / PR evidence: The same interface-class paths are now reported as `Any | _InterfaceClassWithCustomMethods | InterfaceClass`. Numerous member/call messages are consolidated or disappear, and all four test_registry assignment headers vanish. Some remaining errors are plausibly better: for example, members implemented by Specification are no longer separately rejected. But the new Any arm and lost assignment checks are precision loss, not merely rewritten wording. Why this matters: Downstream code can no longer rely on Pyright consistently preserving the specialized interface-class API or rejecting an arbitrary object assigned to `provided`. An Any union arm can suppress member, argument, callability, comparison, and assignment validation; loss of outer/synthesized type information matters even if some previous unknown-member reports were false positives. Runtime behavior need not change for this to be a checker regression. Causal analysis: The PR lowers Binder complexity by omitting statically and structurally unreachable label antecedents. Its test shows this can activate call-site return inference that the baseline complexity guard skipped. zope.interface constructs rich class-like interface objects through unannotated, flow-heavy machinery; activating a different inference path can replace the prior synthesized starred return forms with a union containing Any. That causal path matches the broad, coherent detail transition and the vanished registry checks. Counterevidence is that Specification defines several members previously reported missing, so part of the diagnostic reduction may be a genuine improvement. It does not account for Any entering the result or for unrelated object-to-provided assignments becoming accepted. Because the exact zope checkout and a baseline/head reveal at a representative constructor were not resolved, this remains a credible regression rather than a proven defect. Uncertainty / next check: Resolve the exact ecosystem SHA and reveal the result of one affected interface constructor on baseline and head. Positive control: `_calculate_sro`, `changed`, and comparison remain usable. Negative controls: a nonexistent member/call and assigning object to typed `provided` must still fail. Also test just below/above the complexity threshold to isolate the new inference path.
apprise: Restored call-site inference now carries a possible None into two Office 365 int conversions, so Pyright newly rejects conversions that were previously unchecked at those locations.Regression warning signals require review, regardless of the AI assessment:
AI assessment: Expected improvement (medium confidence). PR attribution: Likely caused by the PR. Before / baseline evidence: The baseline emitted no diagnostic at office365.py:1067:29 or 1108:29. The artifact contains no baseline reveal, so this establishes absence of checking at those calls, not that the argument was previously inferred as a particular safe type. The exact Apprise checkout was not recorded in the available source-run logs. After / PR evidence: At both Office 365 locations, the argument to int is inferred as `Unknown | Any | None`; Pyright reports that this is incompatible with `_ConvertibleToInt`. The concrete None arm is enough to make each conversion unsafe. Unknown and Any indicate incomplete precision, but the outer int call is still checked rather than erased to Any. Why this matters: Consumers can no longer rely on these conversions passing static analysis without a None guard or a stronger producer annotation. The added diagnostics can prevent a possible invalid `int(None)` path and encourage narrowing. This is a static checking improvement even without proof of a runtime failure, though the Unknown/Any arms mean useful information is still missing. Causal analysis: The PR changes flow complexity so label antecedents known unreachable by structure or static condition no longer consume the complexity budget. This can let Pyright perform call-site return inference for a flow-heavy unannotated helper where the baseline hit the cutoff. The exact-head test demonstrates that intended route with repeated statically-falsy `or {}` expressions and a recovered Literal[1] return. The two Apprise additions are consistent with the newly analyzed producer returning a union that preserves None into existing `int` overload checking. Unlike the zope.interface signal, the result has not become bare Any: Pyright retains a concrete unsafe alternative and emits a useful argument error. The remaining uncertainty is whether surrounding control flow should have narrowed None before these calls; absent that invariant, the diagnostics are expected improvements rather than regressions. Uncertainty / next check: Confirm the exact Apprise revision and inspect the producer and guards feeding lines 1067 and 1108. A minimal positive control should pass a definitely numeric/string value through the same flow and type-check; a negative control should preserve a possible None and continue to fail. Reveal both arguments to determine whether Unknown/Any can also be eliminated.
Full evidence and limitations: download |
|
I checked the project revisions from the mypy_primer analysis. All 3 findings come from
AI disclosure: this text is AI-generatedChecked against the project revisions primer cloned (sympy 2542c76f5, zope.interface c22096908, apprise 7423ce7ed). Every delta comes from functions that now fall under a code flow complexity limit and get the return type main's inference already produces for them, instead of apprise: both new errors are true positives. sympy:
zope.interface:
|
Summary
The overcount predates #11520, which made it much more common by extending static evaluation to literals such as
{},[],0and"". Each operand of a binary logical operator adds 1 to its function's code flow complexity when its truthiness is evaluated statically. This can push a function over the limits for call-site return type inference (maxReturnCallSiteTypeInferenceCodeFlowComplexity, 8) and for return type inference with unannotated parameters (maxReturnTypeInferenceCodeFlowComplexity, 32), and the evaluator then infers its return type asUnknown.Root cause
_finishFlowLabeladds the number of antecedents minus one to the code flow complexity for each label, including unreachable antecedents. Code flow analysis stops when it reaches an unreachable antecedent, so it adds no path.When the truthiness of an operand of a binary logical operator is evaluated statically,
_createFlowConditionalreturns the unreachable static condition node for the branch that can't be taken, rather than the same antecedent as the other branch._addAntecedentchecks whether the current flow node is reachable, not the antecedent, so it adds the unreachable node to the label as a distinct antecedent.Filtering in
_addAntecedentinstead would leave some labels with no antecedents, which changes how unreachable code is reported.Fix
Count only antecedents not flagged
UnreachableStructuralorUnreachableStaticConditionwhen computing a label's contribution to the complexity.Test
Each
b = b or {}assignment adds 1 to the complexity with the fix and 2 without it, andmaxReturnCallSiteTypeInferenceCodeFlowComplexityis 8, so four is the fewest that reach the limit without the fix while staying under it with the fix.Cases added to
callSite13.pyfunc1b or {}, statically falsy right operand:Literal[1]func20 or b, statically falsy left operand:Literal[1]func3b or {}, at the limit with the fix:Unknownfunc4b or a, no static operand:Unknown