Union of Function0 creates an intersection of return type (regression from 3.1.1?)
See original GitHub issueCompiler version
3.1.3
Minimized code
object EB:
type Outcome = Command | SideEffect | CmdEffect
type OutcomeSpec = Command | (() => Unit) | (() => Seq[Command])
inline def asOutcome(o: OutcomeSpec): Outcome =
inline o match
case c: Command => c
case f: (() => Seq[Command]) => CmdEffect(_ => f())
case f: (() => Unit) => SideEffect(_ => f())
inline def apply[S](ev: WithSource[Event, S], ctx: String, f: OutcomeSpec): EB[S] =
...
EB(b.st.release, "", () => Seq.empty[Command])
Output
Found: Seq[Command]
Required: Unit & Seq[Command]
Expectation
In 3.1.1 this compiled fine, not sure if this is a regression or the rules changed.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
2.1.3.2.3 - Unions | STAT 200
A union is communicated using the symbol ∪. P ( A ∪ B ) is read as "the probability of A or B."...
Read more >Index (Spark 3.1.1 JavaDoc)
Returns an array of the elements in the intersection of the given two arrays, without duplicates. array_join(Column, String, String) - Static method in ......
Read more >Union of Intersections (UoI) for Interpretable Data Driven ...
In UoI, feature compression via intersections and feature expansion via unions are balanced to maximize prediction accuracy of the sparsely estimated model ...
Read more >Chapter 7: Correlation and Simple Linear Regression
Correlation is defined as the statistical association between two variables. ... Scatterplot with regression model illustrating a residual value.
Read more >Regression
To predict a score: ✓ Multiply the explanatory variable by the slope. ✓ Add the result to the value of the intercept. Page...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
try 3.2.1-RC1, which is now out
I have just upgraded to 3.2.0 and the bug is still present. Will wait till 3.2.1 I guess.