@@ -258,10 +258,10 @@ bool ReadSingleResxFile(ResxFile lang, out Dictionary<string, (string, IXmlLineI
258258 {
259259 if ( fallback is not null && ! fallback . ContainsKey ( entry . key ) )
260260 errorsAndWarnings . Add ( Diagnostic . Create ( s_spuriousKey ,
261- GetMemberLocation ( options , entry . line , entry . key ) , entry . key ) ) ;
261+ GetMemberLocation ( lang , entry . line , entry . key ) , entry . key ) ) ;
262262 else if ( dictionary . ContainsKey ( entry . key ) )
263263 errorsAndWarnings . Add ( Diagnostic . Create ( s_duplicateWarning ,
264- GetMemberLocation ( options , entry . line , entry . key ) , entry . key ) ) ;
264+ GetMemberLocation ( lang , entry . line , entry . key ) , entry . key ) ) ;
265265 else
266266 dictionary . Add ( entry . key , ( entry . value , entry . line ) ) ;
267267 }
@@ -295,9 +295,9 @@ bool ReadSingleResxFile(ResxFile lang, out Dictionary<string, (string, IXmlLineI
295295 }
296296 }
297297
298- private static Location GetMemberLocation ( FileOptions fileOptions , IXmlLineInfo line , string memberName ) =>
298+ private static Location GetMemberLocation ( ResxFile fileOptions , IXmlLineInfo line , string memberName ) =>
299299 Location . Create (
300- filePath : fileOptions . GroupedFile . MainFile . File . Path ,
300+ filePath : fileOptions . File . Path ,
301301 textSpan : new ( ) ,
302302 lineSpan : new (
303303 start : new ( line . LineNumber - 1 , line . LinePosition - 1 ) ,
@@ -335,7 +335,7 @@ out bool resourceAccessByName
335335 {
336336 errorsAndWarnings . Add ( Diagnostic . Create (
337337 descriptor : s_memberSameAsClassWarning ,
338- location : GetMemberLocation ( options , line , memberName ) , memberName
338+ location : GetMemberLocation ( options . GroupedFile . MainFile , line , memberName ) , memberName
339339 ) ) ;
340340 return false ;
341341 }
0 commit comments