Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.0.0-beta3
-
Fix Version/s: None
-
Component/s: Liquidsoap
-
Labels:None
Description
The following does not work:
output.dummy(
fallback([strip_blank(sine()), sine()]),
fallible=true)
I get:
this value has type
source(_)
but it should be a subtype of (the type of the value at line 1, char 35-42)
active_source(_)
It is my understanding that there should be no technical reasons to prohibit this and so there must be something to do at the type-checking level..
Edit: The problem is that type inference guesses that this is a list of active_sources, but the second one isn't active; we need a constraint-based type inference algorithm to integrate subtyping in smarter ways, eg. delay the guess until we've seen all elements.
output.dummy(
fallback([strip_blank(sine()), sine()]),
fallible=true)
I get:
this value has type
source(_)
but it should be a subtype of (the type of the value at line 1, char 35-42)
active_source(_)
It is my understanding that there should be no technical reasons to prohibit this and so there must be something to do at the type-checking level..
Edit: The problem is that type inference guesses that this is a list of active_sources, but the second one isn't active; we need a constraint-based type inference algorithm to integrate subtyping in smarter ways, eg. delay the guess until we've seen all elements.