You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix#2412: Local error causes spurious errors to be reported
`FunProto#typedArgs` was using the implicit Context from the `FunProto`
constructor, and thus errors weren't stored in the proper context.
This is fixed by passing an implicit Context argument to
`typedArgs` (this was already done for `typedArg`), this means that we
no longer need to store a Context in the class, on the other hand there
are some new difficulties:
- `FunProto#typedArgs` can only be safely called from a point where the
implicit Context contains the Context where the `FunProto` instance was
created in its owner chain. This is usually the case but required some
changes to Implicits (done in the previous commit)
- The Context used must be created with Context#thisCallArgContext when
typing the arguments of a this(...) constructor call. This requires
passing storing this information in FunProto. This wouldn't be necessary
if we could simply type the whole this(...) Apply node with
Context#thisCallArgContext, unfortunately this does not work since this
Context does not have the constructors of the class in scope, and I did
not figure out a way to construct a Context that would have them in
scope without having the other methods of the class in scope.
0 commit comments