-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't workingtestingRelated to testing Ruff itselfRelated to testing Ruff itselftyMulti-file analysis & type inferenceMulti-file analysis & type inference
Description
I got this property test failure on a local PR branch:
failures:
---- types::property_tests::stable::subtype_of_implies_not_disjoint_from stdout ----
thread 'types::property_tests::stable::subtype_of_implies_not_disjoint_from' panicked at /Users/alexw/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/quickcheck-1.0.3/src/tester.rs:165:28:
[quickcheck] TEST FAILED. Arguments: (Intersection { pos: [Callable { params: List([Param { kind: PositionalOnly, name: Some(Name("n1")), annotated_ty: Some(KnownClassInstance(Object)), default_ty: None }]), returns: Some(StringLiteral("")) }, StringLiteral("")], neg: [] }, LiteralString)
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Which I minimized down to this:
from typing import Callable, Literal, LiteralString
from knot_extensions import Intersection, static_assert, is_subtype_of, is_disjoint_from
static_assert(is_subtype_of(Intersection[Callable[[], None], Literal[""]], LiteralString))
static_assert(not is_disjoint_from(Intersection[Callable[[], None], Literal[""]], LiteralString)) # This assertion fails, but should logically hold true if the first assertion passes!And the minimal repro also reproduces on main: https://playknot.ruff.rs/8cad645a-b986-42b8-baa7-ef8b75e81b3e
cc. @dhruvmanila
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingtestingRelated to testing Ruff itselfRelated to testing Ruff itselftyMulti-file analysis & type inferenceMulti-file analysis & type inference