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
srawlins opened this issue
Jan 21, 2022
· 1 comment
Assignees
Labels
P1A high priority bug; for example, a single project is unusable or has many test failurestype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
The text was updated successfully, but these errors were encountered:
srawlins
added
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
P1
A high priority bug; for example, a single project is unusable or has many test failures
labels
Jan 21, 2022
I think when we encounter a covariant parameter, we must walk up inheritance and get the LUB of all the corresponding parameters. Testing considerations:
chain of two covariant parameters which successively narrow the type
covariant parameter in method overriding method from mixin
positional parameters
named parameters
parameters with default values (the AST plays tricks here)
covariant optional parameter with corresponding super-parameter with an overridden method which does not feature a corresponding parameter.
Fixes#506
A covariant parameter may tighten its type. In this case, mockito must
consider the parameter types in overridden methods and choose the LUB as the
type of the parameter it is implementing.
PiperOrigin-RevId: 423409713
Fixesdart-lang/mockito#506
A covariant parameter may tighten its type. In this case, mockito must
consider the parameter types in overridden methods and choose the LUB as the
type of the parameter it is implementing.
PiperOrigin-RevId: 423409713
P1A high priority bug; for example, a single project is unusable or has many test failurestype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)
From @athomas :
This
foo
override is invalid.The text was updated successfully, but these errors were encountered: