On Fri, 28 Apr 2023 13:01:33 GMT, Jan Lahoda <jlah...@openjdk.org> wrote:

>> I see that logic in JavaCompiler - I wonder if that's just the way it is, or 
>> if there's a deeper reason as to why the sourcefile is set on the toplevel 
>> unit *after* parsing (I don't think I can see any, in which case that might 
>> be changed if that makes the rest of the code simpler). @lahodaj what do you 
>> think?
>
> I believe we were discussing this some time ago, and there were some 
> problems. I don't recall the exact details, but I'll try to look into this 
> later.

I've sketched this:
https://github.com/lahodaj/jdk/commit/efe55f7d354ed7bbf91077d058823d682db501b9

I don't have too strong opinion here, there might be more cleanup possible 
after a change like this, and might be a bit cleaner outside of the parser; but 
forces the parser to work with files which is somewhat less clean.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/13689#discussion_r1180673509

Reply via email to