Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TreeUnpickler: fix cycle involving param accessor
When unpickling a template like `A` in i12834.scala, the first thing we do is to unpickle its class parameters, here that's `ref`. While unpickling `ref` we run `avoidPrivateLeaks` on it which forces its info and requires unpickling `B` which refers to `A.<init>` which leads to a crash because we haven't entered `<init>` in `A` yet. We can avoid this cycle by simply not running `avoidPrivateLeaks` on param accessors, this should be safe since a primary constructor parameter cannot refer to a type member of the class. Fixes scala#12834.
- Loading branch information