odersky

Results 365 comments of odersky

One new thing over the previous PR is that we fix is the handling of `Singleton`. `X

We now also implement precise type inference using a `Precise` typeclass trait. After the change to `Singleton`, this was relatively straightforward except we hit some complications with constant folding, where...

I believe the answer will be "it depends". A precise type variable gets instantiated without widening of singletons or unions at the top-level.vA variable is precise if it is declared...

> This currently looks very weird to me, as I am used to think about givens as special vals or defs. (Anyway, probably not the place and time to discuss...

Thanks for the minimization! Here's a standalone reproducer as a pos test: 1. Take the scala files in the project and put them in one directory, append _1 to every...

It works without cyclic errors if unification has an explicit type: ```scala private[typer] val unification: Unification = new Unification(using this) ```

I added some more diagnostics in #20251. You need to compile with -explain-cyclic then that gives hopefully more info. It's unfortunately not feasible to ensure that cyclic errors appear independent...

@b-studios Did you compile the project with -explain-cyclic? Any new insights what might be the cause? If not I could take a look at the error trace. Ideally, with -explain-cyclic...

#20251 would hopefully give some more information than nightly. I justy merged it, so next nightly should work better. But anyway, let's look at the trace: Cyclic reference involving class...

Did you try adding an explicit type for `unification`?