-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression in getkyo/kyo
for typer
#20297
Comments
this also doesn't compile in 3.3.0, but it seems Kyo only targets 3.4.0 |
That's correct, they target 3.4 due to some of missing features. What's important is the fact that this project actual is stress test for the typer, especially in areas of intersection/union types, extensions, inlines etc. One other recent issue #20154, I'm also preparing the second issue found in the same repo (not yet sure it it's the same a current reproducer) |
The second reproducer for which bisect points to b28d4c1 private object internal:
opaque type TakeN >: Int <: Int = Int
sealed abstract class Kyo[+T, -S]
abstract class Effect[+E]
import internal.*
opaque type <[+T, -S] >: T = T | internal.Kyo[T, S]
object Vars:
def apply[V]: Vars[V] = ???
class Vars[V] extends Effect[Vars[V]]:
def run[T, S2](state: V)(value: T < (Vars[V] & S2)): T < S2 = ???
def use[T, S](f: V => T < S): T < (Vars[V] & S) = ???
class Streams[V] extends Effect[Streams[V]]
object Streams:
def emitValue[V](v: V): Unit < Streams[V] = ???
opaque type Stream[+T, V, -S] = T < (Streams[V] & S)
object Stream:
extension [T, V, S](s: Stream[T, V, S]) {
// Fails only when method is inlined
inline def reemit[S2, V2](
f: V => Unit < (Streams[V2] & S2)
): Stream[T, V2, S & S2] = ???
def take(n: Int): Stream[T, V, S] =
Vars[TakeN].run(n) {
reemit { v =>
Vars[TakeN].use { case n => () }
}
}
} Output: [error] ./bisect/test.scala:27:11
[error] Found: Unit < Vars[internal.TakeN]
[error] Required: Unit < (Streams[V] & (Streams[V] & S))
[error] Vars[TakeN].use { case n => () } |
Reverts parts of scala#19922. Fixes scala#20342, scala#20297 The logic that we should ignore declared result types of inline methods really only applies to transparent inlines.
Reverts parts of scala#19922. Fixes scala#20342, scala#20297 The logic that we should ignore declared result types of inline methods really only applies to transparent inlines.
Reverts parts of scala#19922. Fixes scala#20342, scala#20297 The logic that we should ignore declared result types of inline methods really only applies to transparent inlines.
Reverts parts of scala#19922. Fixes scala#20342, scala#20297 The logic that we should ignore declared result types of inline methods really only applies to transparent inlines.
Based on OpenCB failure in
getkyo/kyo
- build logsCompiler version
Last good release: 3.4.2-RC1-bin-20240311-02c2a6e-NIGHTLY
First bad release: 3.4.2-RC1-bin-20240312-3694d95-NIGHTLY
Exact bisect has failed due to errors when building compiler, could be caused by any of:
b28d4c1
2421581
Minimized code
Output
Expectation
Should compile
The text was updated successfully, but these errors were encountered: