Guillaume Martres

Results 217 comments of Guillaume Martres

Ok, but it would still be good if someone else could review this then.

Nice! I was considering whether the nestingLevel should be stored in the Constraint, because there's multiple places where we rollback constraints without rolling back the full TyperState, e.g: - https://github.com/lampepfl/dotty/blob/ead0fbc7804026e2c764f88f7576029c2fb7a51f/compiler/src/dotty/tools/dotc/typer/ProtoTypes.scala#L103...

I'm not sure if this is according to design actually: ```scala scala> def id[A](v: A): A = v def id[A](v: A): A scala> id(5: Int | Unit) val res0: Int...

I don't personally have the time to work on anything for the next few months.

I don't think it's by design, we have some logic to try to preserve hard unions (that is: unions written by the user rather than inferred) through type inference already:...

> p.q.X has lowest precedence: it is made available by the packaging package q but cannot shadow the high priority definition p.X, and is therefore ambiguous. Is this the behavior...

While this shouldn't crash, note that the real issue here is not caused by the compiler, in the compiler output before the crash I see: > ***** missing reference, looking...

Instead of generating a classOf tree you can use [`tpd.clsOf`](https://github.com/lampepfl/dotty/blob/1292246c9646db12391cb7e42ce951722ac7fd03/compiler/src/dotty/tools/dotc/ast/tpd.scala#L1226-L1231) which will generate the appropriate tree for the current compiler phase.

Yes, this is needed to avoid memory leaks, it's only done if a is private and the compiler is sure that it isn't used anywhere else, see the pr where...

> I guess once scala 3.0 final is out, we'll rename it to just scalac +1 to that :).