@@ -258,10 +258,10 @@ bool ReadSingleResxFile(ResxFile lang, out Dictionary<string, (string, IXmlLineI
258
258
{
259
259
if ( fallback is not null && ! fallback . ContainsKey ( entry . key ) )
260
260
errorsAndWarnings . Add ( Diagnostic . Create ( s_spuriousKey ,
261
- GetMemberLocation ( options , entry . line , entry . key ) , entry . key ) ) ;
261
+ GetMemberLocation ( lang , entry . line , entry . key ) , entry . key ) ) ;
262
262
else if ( dictionary . ContainsKey ( entry . key ) )
263
263
errorsAndWarnings . Add ( Diagnostic . Create ( s_duplicateWarning ,
264
- GetMemberLocation ( options , entry . line , entry . key ) , entry . key ) ) ;
264
+ GetMemberLocation ( lang , entry . line , entry . key ) , entry . key ) ) ;
265
265
else
266
266
dictionary . Add ( entry . key , ( entry . value , entry . line ) ) ;
267
267
}
@@ -295,9 +295,9 @@ bool ReadSingleResxFile(ResxFile lang, out Dictionary<string, (string, IXmlLineI
295
295
}
296
296
}
297
297
298
- private static Location GetMemberLocation ( FileOptions fileOptions , IXmlLineInfo line , string memberName ) =>
298
+ private static Location GetMemberLocation ( ResxFile fileOptions , IXmlLineInfo line , string memberName ) =>
299
299
Location . Create (
300
- filePath : fileOptions . GroupedFile . MainFile . File . Path ,
300
+ filePath : fileOptions . File . Path ,
301
301
textSpan : new ( ) ,
302
302
lineSpan : new (
303
303
start : new ( line . LineNumber - 1 , line . LinePosition - 1 ) ,
@@ -335,7 +335,7 @@ out bool resourceAccessByName
335
335
{
336
336
errorsAndWarnings . Add ( Diagnostic . Create (
337
337
descriptor : s_memberSameAsClassWarning ,
338
- location : GetMemberLocation ( options , line , memberName ) , memberName
338
+ location : GetMemberLocation ( options . GroupedFile . MainFile , line , memberName ) , memberName
339
339
) ) ;
340
340
return false ;
341
341
}
0 commit comments