Skip to content

Conversation

@migeed-z
Copy link
Contributor

Summary:
We incorrectly infer abstract method types as if they are regular methods, which causes an overload error downstream.

Instead, as suggested in the comments (#2072), we could consider special casing them by disabeling inference on them.

RFC:
I am implementing this by storing the following

  • metadata key
  • trivial function bodies

the reason is what we want to thread this information to the solver stage and then infer any on methods where the surrounding class is abstract and the function body is trivial

Reviewed By: stroxler

Differential Revision: D90561905

Summary:
We incorrectly infer abstract method types as if they are regular methods, which causes an overload error downstream.

Instead, as suggested in the comments (facebook#2072), we could consider special casing them by disabeling inference on them.

I suspect that we will have to collect and thread some info from the binding stage here because we wait to specifically detect the empty function body. In the solving stage, that would have already been transformed to a "never" type.

Reviewed By: stroxler

Differential Revision: D90560069
Summary:
We incorrectly infer abstract method types as if they are regular methods, which causes an overload error downstream.

Instead, as suggested in the comments (facebook#2072), we could consider special casing them by disabeling inference on them.

RFC:
I am implementing this by storing the following
- metadata key
- trivial function bodies

the reason is what we want to thread this information to the solver stage and then infer any on methods where the surrounding class is abstract and the function body is trivial

Reviewed By: stroxler

Differential Revision: D90561905
@meta-cla meta-cla bot added the cla signed label Jan 13, 2026
@meta-codesync
Copy link

meta-codesync bot commented Jan 13, 2026

@migeed-z has exported this pull request. If you are a Meta employee, you can view the originating Diff in D90561905.

Copy link
Contributor

@stroxler stroxler left a comment

Choose a reason for hiding this comment

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

Review automatically exported from Phabricator review in Meta.

@github-actions
Copy link

Diff from mypy_primer, showing the effect of this PR on open source code:

sockeye (https://github.com/awslabs/sockeye)
- ERROR sockeye/beam_search.py:75:9-24: Class member `_SingleModelInference.state_structure` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR sockeye/beam_search.py:78:9-30: Class member `_SingleModelInference.encode_and_initialize` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR sockeye/beam_search.py:82:9-20: Class member `_SingleModelInference.decode_step` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR sockeye/beam_search.py:119:9-32: Class member `_SingleModelInference.model_output_vocab_size` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR sockeye/beam_search.py:123:9-39: Class member `_SingleModelInference.model_output_factor_vocab_size` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR sockeye/beam_search.py:144:9-24: Class member `_EnsembleInference.state_structure` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR sockeye/beam_search.py:147:9-30: Class member `_EnsembleInference.encode_and_initialize` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR sockeye/beam_search.py:164:9-20: Class member `_EnsembleInference.decode_step` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR sockeye/beam_search.py:211:9-32: Class member `_EnsembleInference.model_output_vocab_size` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR sockeye/beam_search.py:215:9-39: Class member `_EnsembleInference.model_output_factor_vocab_size` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR sockeye/lexicon.py:207:9-16: Class member `TopKLexicon.load_np` overrides parent class `RestrictLexicon` in an inconsistent manner [bad-override]
- ERROR sockeye/lexicon.py:294:9-16: Class member `StaticBlockLexicon.load_np` overrides parent class `RestrictLexicon` in an inconsistent manner [bad-override]
- ERROR test/unit/test_beam_search.py:248:9-24: Class member `_TestInference.state_structure` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR test/unit/test_beam_search.py:251:9-30: Class member `_TestInference.encode_and_initialize` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR test/unit/test_beam_search.py:295:9-32: Class member `_TestInference.model_output_vocab_size` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ERROR test/unit/test_beam_search.py:299:9-39: Class member `_TestInference.model_output_factor_vocab_size` overrides parent class `_Inference` in an inconsistent manner [bad-override]
- ::error file=sockeye/beam_search.py,line=75,col=9,endLine=75,endColumn=24,title=Pyrefly bad-override::Class member `_SingleModelInference.state_structure` overrides parent class `_Inference` in an inconsistent manner%0A  `_SingleModelInference.state_structure` has type `BoundMethod[_SingleModelInference, (self: _SingleModelInference) -> list[Unknown]]`, which is not assignable to `BoundMethod[_SingleModelInference, (self: _SingleModelInference) -> Never]`, the type of `_Inference.state_structure`
- ::error file=sockeye/beam_search.py,line=78,col=9,endLine=78,endColumn=30,title=Pyrefly bad-override::Class member `_SingleModelInference.encode_and_initialize` overrides parent class `_Inference` in an inconsistent manner%0A  `_SingleModelInference.encode_and_initialize` has type `BoundMethod[_SingleModelInference, (self: _SingleModelInference, inputs: Unknown, valid_length: Unknown) -> tuple[list[Unknown], Unknown, Unknown | None]]`, which is not assignable to `BoundMethod[_SingleModelInference, (self: _SingleModelInference, inputs: Unknown, valid_length: Unknown) -> Never]`, the type of `_Inference.encode_and_initialize`
- ::error file=sockeye/beam_search.py,line=82,col=9,endLine=82,endColumn=20,title=Pyrefly bad-override::Class member `_SingleModelInference.decode_step` overrides parent class `_Inference` in an inconsistent manner%0A  `_SingleModelInference.decode_step` has type `BoundMethod[_SingleModelInference, (self: _SingleModelInference, step_input: Unknown, states: list[Unknown], vocab_slice_ids: Unknown | None = None, target_prefix_factor_mask: Unknown | None = None, factor_vocab_size: int | None = None) -> tuple[Unknown, list[Unknown], Unknown | None]]`, which is not assignable to `BoundMethod[_SingleModelInference, (self: _SingleModelInference, step_input: Unknown, states: list[Unknown], vocab_slice_ids: Unknown | None = None, target_prefix_factor_mask: Unknown | None = None, factor_vocab_size: int | None = None) -> Never]`, the type of `_Inference.decode_step`
- ::error file=sockeye/beam_search.py,line=119,col=9,endLine=119,endColumn=32,title=Pyrefly bad-override::Class member `_SingleModelInference.model_output_vocab_size` overrides parent class `_Inference` in an inconsistent manner%0A  Property getter for `_SingleModelInference.model_output_vocab_size` has type `BoundMethod[_SingleModelInference, (self: _SingleModelInference) -> int]`, which is not assignable to `BoundMethod[_SingleModelInference, (self: _SingleModelInference) -> Never]`, the property getter for `_Inference.model_output_vocab_size`
- ::error file=sockeye/beam_search.py,line=123,col=9,endLine=123,endColumn=39,title=Pyrefly bad-override::Class member `_SingleModelInference.model_output_factor_vocab_size` overrides parent class `_Inference` in an inconsistent manner%0A  Property getter for `_SingleModelInference.model_output_factor_vocab_size` has type `BoundMethod[_SingleModelInference, (self: _SingleModelInference) -> int | None]`, which is not assignable to `BoundMethod[_SingleModelInference, (self: _SingleModelInference) -> Never]`, the property getter for `_Inference.model_output_factor_vocab_size`
- ::error file=sockeye/beam_search.py,line=144,col=9,endLine=144,endColumn=24,title=Pyrefly bad-override::Class member `_EnsembleInference.state_structure` overrides parent class `_Inference` in an inconsistent manner%0A  `_EnsembleInference.state_structure` has type `BoundMethod[_EnsembleInference, (self: _EnsembleInference) -> list[Unknown]]`, which is not assignable to `BoundMethod[_EnsembleInference, (self: _EnsembleInference) -> Never]`, the type of `_Inference.state_structure`
- ::error file=sockeye/beam_search.py,line=147,col=9,endLine=147,endColumn=30,title=Pyrefly bad-override::Class member `_EnsembleInference.encode_and_initialize` overrides parent class `_Inference` in an inconsistent manner%0A  `_EnsembleInference.encode_and_initialize` has type `BoundMethod[_EnsembleInference, (self: _EnsembleInference, inputs: Unknown, valid_length: Unknown) -> tuple[list[Unknown], Unknown, Unknown | None]]`, which is not assignable to `BoundMethod[_EnsembleInference, (self: _EnsembleInference, inputs: Unknown, valid_length: Unknown) -> Never]`, the type of `_Inference.encode_and_initialize`
- ::error file=sockeye/beam_search.py,line=164,col=9,endLine=164,endColumn=20,title=Pyrefly bad-override::Class member `_EnsembleInference.decode_step` overrides parent class `_Inference` in an inconsistent manner%0A  `_EnsembleInference.decode_step` has type `BoundMethod[_EnsembleInference, (self: _EnsembleInference, step_input: Unknown, states: list[Unknown], vocab_slice_ids: Unknown | None = None, target_prefix_factor_mask: Unknown | None = None, factor_vocab_size: int | None = None) -> tuple[Unknown, list[Unknown], Unknown | None]]`, which is not assignable to `BoundMethod[_EnsembleInference, (self: _EnsembleInference, step_input: Unknown, states: list[Unknown], vocab_slice_ids: Unknown | None = None, target_prefix_factor_mask: Unknown | None = None, factor_vocab_size: int | None = None) -> Never]`, the type of `_Inference.decode_step`
- ::error file=sockeye/beam_search.py,line=211,col=9,endLine=211,endColumn=32,title=Pyrefly bad-override::Class member `_EnsembleInference.model_output_vocab_size` overrides parent class `_Inference` in an inconsistent manner%0A  Property getter for `_EnsembleInference.model_output_vocab_size` has type `BoundMethod[_EnsembleInference, (self: _EnsembleInference) -> int]`, which is not assignable to `BoundMethod[_EnsembleInference, (self: _EnsembleInference) -> Never]`, the property getter for `_Inference.model_output_vocab_size`
- ::error file=sockeye/beam_search.py,line=215,col=9,endLine=215,endColumn=39,title=Pyrefly bad-override::Class member `_EnsembleInference.model_output_factor_vocab_size` overrides parent class `_Inference` in an inconsistent manner%0A  Property getter for `_EnsembleInference.model_output_factor_vocab_size` has type `BoundMethod[_EnsembleInference, (self: _EnsembleInference) -> int | None]`, which is not assignable to `BoundMethod[_EnsembleInference, (self: _EnsembleInference) -> Never]`, the property getter for `_Inference.model_output_factor_vocab_size`
- ::error file=sockeye/lexicon.py,line=207,col=9,endLine=207,endColumn=16,title=Pyrefly bad-override::Class member `TopKLexicon.load_np` overrides parent class `RestrictLexicon` in an inconsistent manner%0A  `TopKLexicon.load_np` has type `BoundMethod[TopKLexicon, (self: TopKLexicon, lex: Unknown, k: int | None = None) -> None]`, which is not assignable to `BoundMethod[TopKLexicon, (self: TopKLexicon, lex: Unknown, k: int | None = None) -> Never]`, the type of `RestrictLexicon.load_np`
- ::error file=sockeye/lexicon.py,line=260,col=9,endLine=260,endColumn=28,title=Pyrefly bad-override::Class member `TopKLexicon.get_blocked_trg_ids` overrides parent class `RestrictLexicon` in an inconsistent manner%0A  `TopKLexicon.get_blocked_trg_ids` has type `BoundMethod[TopKLexicon, (self: TopKLexicon, src_ids: Unknown) -> Never]`, which is not assignable to `BoundMethod[TopKLexicon, (self: TopKLexicon, src_ids: Unknown | None = None) -> Unknown]`, the type of `RestrictLexicon.get_blocked_trg_ids`
+ ::error file=sockeye/lexicon.py,line=260,col=9,endLine=260,endColumn=28,title=Pyrefly bad-override::Class member `TopKLexicon.get_blocked_trg_ids` overrides parent class `RestrictLexicon` in an inconsistent manner%0A  `TopKLexicon.get_blocked_trg_ids` has type `BoundMethod[TopKLexicon, (self: TopKLexicon, src_ids: Unknown) -> Unknown]`, which is not assignable to `BoundMethod[TopKLexicon, (self: TopKLexicon, src_ids: Unknown | None = None) -> Unknown]`, the type of `RestrictLexicon.get_blocked_trg_ids`
- ::error file=sockeye/lexicon.py,line=294,col=9,endLine=294,endColumn=16,title=Pyrefly bad-override::Class member `StaticBlockLexicon.load_np` overrides parent class `RestrictLexicon` in an inconsistent manner%0A  `StaticBlockLexicon.load_np` has type `BoundMethod[StaticBlockLexicon, (self: StaticBlockLexicon, lex: Unknown, k: int | None = None) -> None]`, which is not assignable to `BoundMethod[StaticBlockLexicon, (self: StaticBlockLexicon, lex: Unknown, k: int | None = None) -> Never]`, the type of `RestrictLexicon.load_np`
- ::error file=sockeye/lexicon.py,line=307,col=9,endLine=307,endColumn=28,title=Pyrefly bad-override::Class member `StaticBlockLexicon.get_allowed_trg_ids` overrides parent class `RestrictLexicon` in an inconsistent manner%0A  `StaticBlockLexicon.get_allowed_trg_ids` has type `BoundMethod[StaticBlockLexicon, (self: StaticBlockLexicon, src_ids: Unknown) -> Never]`, which is not assignable to `BoundMethod[StaticBlockLexicon, (self: StaticBlockLexicon, src_ids: Unknown | None = None) -> Unknown]`, the type of `RestrictLexicon.get_allowed_trg_ids`
+ ::error file=sockeye/lexicon.py,line=307,col=9,endLine=307,endColumn=28,title=Pyrefly bad-override::Class member `StaticBlockLexicon.get_allowed_trg_ids` overrides parent class `RestrictLexicon` in an inconsistent manner%0A  `StaticBlockLexicon.get_allowed_trg_ids` has type `BoundMethod[StaticBlockLexicon, (self: StaticBlockLexicon, src_ids: Unknown) -> Unknown]`, which is not assignable to `BoundMethod[StaticBlockLexicon, (self: StaticBlockLexicon, src_ids: Unknown | None = None) -> Unknown]`, the type of `RestrictLexicon.get_allowed_trg_ids`
- ::error file=test/unit/test_beam_search.py,line=248,col=9,endLine=248,endColumn=24,title=Pyrefly bad-override::Class member `_TestInference.state_structure` overrides parent class `_Inference` in an inconsistent manner%0A  `_TestInference.state_structure` has type `BoundMethod[_TestInference, (self: _TestInference) -> LiteralString]`, which is not assignable to `BoundMethod[_TestInference, (self: _TestInference) -> Never]`, the type of `_Inference.state_structure`
- ::error file=test/unit/test_beam_search.py,line=251,col=9,endLine=251,endColumn=30,title=Pyrefly bad-override::Class member `_TestInference.encode_and_initialize` overrides parent class `_Inference` in an inconsistent manner%0A  `_TestInference.encode_and_initialize` has type `BoundMethod[_TestInference, (self: _TestInference, inputs: Unknown, valid_length: Unknown | None = None) -> tuple[list[Unknown], Unknown, None]]`, which is not assignable to `BoundMethod[_TestInference, (self: _TestInference, inputs: Unknown, valid_length: Unknown) -> Never]`, the type of `_Inference.encode_and_initialize`
- ::error file=test/unit/test_beam_search.py,line=263,col=9,endLine=263,endColumn=20,title=Pyrefly bad-override::Class member `_TestInference.decode_step` overrides parent class `_Inference` in an inconsistent manner%0A  `_TestInference.decode_step` has type `BoundMethod[_TestInference, (self: _TestInference, step_input: Unknown, states: list[Unknown], vocab_slice_ids: Unknown | None = None, *args: Unknown) -> tuple[Unknown, list[Unknown], None]]`, which is not assignable to `BoundMethod[_TestInference, (self: _TestInference, step_input: Unknown, states: list[Unknown], vocab_slice_ids: Unknown | None = None, target_prefix_factor_mask: Unknown | None = None, factor_vocab_size: int | None = None) -> Never]`, the type of `_Inference.decode_step`
+ ::error file=test/unit/test_beam_search.py,line=263,col=9,endLine=263,endColumn=20,title=Pyrefly bad-override::Class member `_TestInference.decode_step` overrides parent class `_Inference` in an inconsistent manner%0A  `_TestInference.decode_step` has type `BoundMethod[_TestInference, (self: _TestInference, step_input: Unknown, states: list[Unknown], vocab_slice_ids: Unknown | None = None, *args: Unknown) -> tuple[Unknown, list[Unknown], None]]`, which is not assignable to `BoundMethod[_TestInference, (self: _TestInference, step_input: Unknown, states: list[Unknown], vocab_slice_ids: Unknown | None = None, target_prefix_factor_mask: Unknown | None = None, factor_vocab_size: int | None = None) -> Unknown]`, the type of `_Inference.decode_step`
- ::error file=test/unit/test_beam_search.py,line=295,col=9,endLine=295,endColumn=32,title=Pyrefly bad-override::Class member `_TestInference.model_output_vocab_size` overrides parent class `_Inference` in an inconsistent manner%0A  Property getter for `_TestInference.model_output_vocab_size` has type `BoundMethod[_TestInference, (self: _TestInference) -> int]`, which is not assignable to `BoundMethod[_TestInference, (self: _TestInference) -> Never]`, the property getter for `_Inference.model_output_vocab_size`
- ::error file=test/unit/test_beam_search.py,line=299,col=9,endLine=299,endColumn=39,title=Pyrefly bad-override::Class member `_TestInference.model_output_factor_vocab_size` overrides parent class `_Inference` in an inconsistent manner%0A  Property getter for `_TestInference.model_output_factor_vocab_size` has type `BoundMethod[_TestInference, (self: _TestInference) -> None]`, which is not assignable to `BoundMethod[_TestInference, (self: _TestInference) -> Never]`, the property getter for `_Inference.model_output_factor_vocab_size`

scikit-learn (https://github.com/scikit-learn/scikit-learn)
+ ERROR sklearn/semi_supervised/_label_propagation.py:300:28-46: Object of class `SparseABC` has no attribute `tocsr` [missing-attribute]
- ERROR sklearn/semi_supervised/_label_propagation.py:619:9-21: Class member `LabelSpreading._build_graph` overrides parent class `BaseLabelPropagation` in an inconsistent manner [bad-override]
- ::error file=sklearn/ensemble/_gb.py,line=963,col=9,endLine=963,endColumn=24,title=Pyrefly bad-override::Class member `BaseGradientBoosting._make_estimator` overrides parent class `BaseEnsemble` in an inconsistent manner%0A  `BaseGradientBoosting._make_estimator` has type `BoundMethod[BaseGradientBoosting, (self: BaseGradientBoosting, append: bool | Unknown = True) -> Never]`, which is not assignable to `BoundMethod[BaseGradientBoosting, (self: BaseGradientBoosting, append: bool | Unknown = True, random_state: Unknown | None = None) -> dict[Unknown, Unknown] | type | Unknown]`, the type of `BaseEnsemble._make_estimator`
+ ::error file=sklearn/ensemble/_gb.py,line=963,col=9,endLine=963,endColumn=24,title=Pyrefly bad-override::Class member `BaseGradientBoosting._make_estimator` overrides parent class `BaseEnsemble` in an inconsistent manner%0A  `BaseGradientBoosting._make_estimator` has type `BoundMethod[BaseGradientBoosting, (self: BaseGradientBoosting, append: bool | Unknown = True) -> Unknown]`, which is not assignable to `BoundMethod[BaseGradientBoosting, (self: BaseGradientBoosting, append: bool | Unknown = True, random_state: Unknown | None = None) -> dict[Unknown, Unknown] | type | Unknown]`, the type of `BaseEnsemble._make_estimator`
+ ::error file=sklearn/semi_supervised/_label_propagation.py,line=300,col=28,endLine=300,endColumn=46,title=Pyrefly missing-attribute::Object of class `SparseABC` has no attribute `tocsr`
- ::error file=sklearn/semi_supervised/_label_propagation.py,line=619,col=9,endLine=619,endColumn=21,title=Pyrefly bad-override::Class member `LabelSpreading._build_graph` overrides parent class `BaseLabelPropagation` in an inconsistent manner%0A  `LabelSpreading._build_graph` has type `BoundMethod[LabelSpreading, (self: LabelSpreading) -> _ScaledLinearOperator[Any] | ndarray[tuple[Any, ...], dtype[Any]] | Unknown]`, which is not assignable to `BoundMethod[LabelSpreading, (self: LabelSpreading) -> Never]`, the type of `BaseLabelPropagation._build_graph`

freqtrade (https://github.com/freqtrade/freqtrade)
- ERROR freqtrade/rpc/api_server/ws/serializer.py:38:9-19: Class member `HybridJSONWebSocketSerializer._serialize` overrides parent class `WebSocketSerializer` in an inconsistent manner [bad-override]
- ::error file=freqtrade/rpc/api_server/ws/serializer.py,line=38,col=9,endLine=38,endColumn=19,title=Pyrefly bad-override::Class member `HybridJSONWebSocketSerializer._serialize` overrides parent class `WebSocketSerializer` in an inconsistent manner%0A  `HybridJSONWebSocketSerializer._serialize` has type `BoundMethod[HybridJSONWebSocketSerializer, (self: HybridJSONWebSocketSerializer, data: Unknown) -> str]`, which is not assignable to `BoundMethod[HybridJSONWebSocketSerializer, (self: HybridJSONWebSocketSerializer, data: Unknown) -> Never]`, the type of `WebSocketSerializer._serialize`

pandas (https://github.com/pandas-dev/pandas)
- ::error file=pandas/core/indexing.py,line=1470,col=9,endLine=1470,endColumn=28,title=Pyrefly bad-override::Class member `_LocIndexer._convert_to_indexer` overrides parent class `_LocationIndexer` in an inconsistent manner%0A  `_LocIndexer._convert_to_indexer` has type `BoundMethod[_LocIndexer, (self: _LocIndexer, key: Unknown, axis: int) -> ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]] | ndarray[tuple[Any, ...], dtype[Any]] | dict[str, int | integer[Any]] | dict[str, tuple[Unknown, ...]] | dict[str, Unknown] | Unknown]`, which is not assignable to `BoundMethod[_LocIndexer, (self: _LocIndexer, key: Unknown, axis: int) -> Never]`, the type of `_LocationIndexer._convert_to_indexer`
+ ::error file=pandas/core/indexing.py,line=1470,col=9,endLine=1470,endColumn=28,title=Pyrefly bad-override::Class member `_LocIndexer._convert_to_indexer` overrides parent class `_LocationIndexer` in an inconsistent manner%0A  `_LocIndexer._convert_to_indexer` has type `BoundMethod[_LocIndexer, (self: _LocIndexer, key: Unknown, axis: int) -> int | ndarray[tuple[int], dtype[Any]] | ndarray[tuple[Any, ...], dtype[signedinteger[_NBitIntP]]] | ndarray[tuple[Any, ...], dtype[Any]] | slice[int, int, Any] | slice[Any, Any, Any] | dict[str, int | integer[Any]] | dict[str, tuple[Unknown, ...]] | dict[str, Unknown] | Unknown]`, which is not assignable to `BoundMethod[_LocIndexer, (self: _LocIndexer, key: Unknown, axis: int) -> Never]`, the type of `_LocationIndexer._convert_to_indexer`

@migeed-z migeed-z closed this Jan 13, 2026
migeed-z added a commit to migeed-z/pyrefly that referenced this pull request Jan 13, 2026
Summary:

We incorrectly infer abstract method types as if they are regular methods, which causes an overload error downstream.

Instead, as suggested in the comments (facebook#2072), we could consider special casing them by disabeling inference on them.

RFC:
I am implementing this by storing the following
- metadata key
- trivial function bodies

the reason is what we want to thread this information to the solver stage and then infer any on methods where the surrounding class is abstract and the function body is trivial

Reviewed By: stroxler

Differential Revision: D90561905
meta-codesync bot pushed a commit that referenced this pull request Jan 13, 2026
Summary:
Pull Request resolved: #2104

We incorrectly infer abstract method types as if they are regular methods, which causes an overload error downstream.

Instead, as suggested in the comments (#2072), we could consider special casing them by disabeling inference on them.

RFC:
I am implementing this by storing the following
- metadata key
- trivial function bodies

the reason is what we want to thread this information to the solver stage and then infer any on methods where the surrounding class is abstract and the function body is trivial

Reviewed By: stroxler

Differential Revision: D90561905

fbshipit-source-id: d5abf5eec65ae1cd6f78ff1cdfa3d53fa64a7900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants