Georgi Krastev

Results 411 comments of Georgi Krastev

Why is the first alternative treated specially? I don't get the purpose of this code. ```scala // Alternatives which conform to bounds def checkWithinBounds(sym: Symbol): Unit = sym.alternatives match {...

The problem is about type inference of compound types. The user expected `neg` to match in both cases but it doesn't because of type inference: ```scala 5: D[D[Int] with D[String]]...

Probably the cyclic check for type aliases in Scala 2 doesn't recurse into type refinements.

> Scala 2 doesn't have a checker, but notices locked symbols during completion. 🤔 ```scala def typedRefinement(templ: Template): Unit = { val stats = templ.body if (!stats.isEmpty) { namer.enterSyms(stats) //...

Refinements have a get-out-of-jail-free card so the lock doesn't work. The test from back in the day looks very similar: https://github.com/scala/scala/commit/86397c940a2b4df6166a9bc9ed3e03d008f4dd57#diff-106425dfd9b57da4e4d204dd3b1fdeead5839e8391d8e5ead89a3e6d63abeaa1

We had a similar problem and it looks like there is a race condition between calling `ZIO.sleep` which registers a suspension in the `TestClock` and calling `TestClock.adjust` which runs it....

But how do we know if there isn't some suspension introduced by other means? We have this test code: ```scala def process(service: TestService, exit: Exit[String, Int]) = for { latch...

> Notice also that you're latch doesn't actually ensure that sleep is called before adjust because latch.countdown is called before sleep and latchl.await is called before adjust, so there is...

> What happens if you do this? It doesn't deadlock 🤷 - I couldn't create a standalone reproduction though, sorry

I tried to create an isolated test that uses only `zio-logging` but I haven't managed yet, for now I have to move on.