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
Line directives may be used to alter the line numbers and compilation unit names that are reported by the compiler in output such as warnings and errors. These values are also used by caller-info attributes (§21.5.5).
The line directive causes the compiler to treat the compilation unit as having a different name. It doesn't cause it to treat it as being a different compilation unit--so, thankfully, we won't have to worry about having a different "file scope" for different line directives, for example.
I think it would be reasonable for us to use the name given by the line directive when determining what file name to use in the metadata name and in symbol display. However, I don't think it's required for correctness of the implementation. I'd like to file an issue to address it after merging the feature.
https://github.com/dotnet/csharpstandard/blob/95e8d0ff3f5a85a8269173a8f5f3a3de70f5f342/standard/lexical-structure.md#658-line-directives
The line directive causes the compiler to treat the compilation unit as having a different name. It doesn't cause it to treat it as being a different compilation unit--so, thankfully, we won't have to worry about having a different "file scope" for different line directives, for example.
I think it would be reasonable for us to use the name given by the line directive when determining what file name to use in the metadata name and in symbol display. However, I don't think it's required for correctness of the implementation. I'd like to file an issue to address it after merging the feature.
Originally posted by @RikkiGibson in #61646 (comment)
Test plan #60819
The text was updated successfully, but these errors were encountered: