Skip to content

Commit 7412e51

Browse files
committed
Remove assumptions about corresponding parameters
This replaces #1350. It's simpler due to #1359 centralizing the tie between an argument and the corresponding parameter's type. Fixes #981
1 parent 62c498f commit 7412e51

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

standard/expressions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ Type inference takes place in phases. Each phase will try to infer type argument
763763
764764
#### 12.6.3.2 The first phase
765765
766-
For each of the method arguments `Eᵢ`, an input type inference ([§12.6.3.7](expressions.md#12637-input-type-inferences)) is made from `Eᵢ` to the corresponding parameter type `T`.
766+
For each of the method arguments `Eᵢ`, an input type inference ([§12.6.3.7](expressions.md#12637-input-type-inferences)) is made from `Eᵢ` to the corresponding parameter type `T`.
767767
768768
#### 12.6.3.3 The second phase
769769
@@ -775,7 +775,7 @@ The second phase proceeds as follows:
775775
- `Xᵢ` has a non-empty set of bounds
776776
- If no such type variables exist and there are still *unfixed* type variables, type inference fails.
777777
- Otherwise, if no further *unfixed* type variables exist, type inference succeeds.
778-
- Otherwise, for all arguments `Eᵢ` with corresponding parameter type `Tᵢ` where the *output types* ([§12.6.3.5](expressions.md#12635-output-types)) contain *unfixed* type variables `Xₑ` but the *input types* ([§12.6.3.4](expressions.md#12634-input-types)) do not, an *output type inference* ([§12.6.3.8](expressions.md#12638-output-type-inferences)) is made *from* `Eᵢ` *to* `T`. Then the second phase is repeated.
778+
- Otherwise, for all arguments `Eᵢ` with corresponding parameter type `Tⱼ` where the *output types* ([§12.6.3.5](expressions.md#12635-output-types)) contain *unfixed* type variables `Xₑ` but the *input types* ([§12.6.3.4](expressions.md#12634-input-types)) do not, an *output type inference* ([§12.6.3.8](expressions.md#12638-output-type-inferences)) is made *from* `Eᵢ` *to* `T`. Then the second phase is repeated.
779779
780780
#### 12.6.3.4 Input types
781781

0 commit comments

Comments
 (0)