[英]Mono throwing warning that I don't think is correct
Mono發出警告:
warning CS0414: The private field 'Convergence.Core.Services.PermissionService.userService' is assigned but its value is never used
這很奇怪,因為最肯定會使用它:
例如:
var systemRoles = (
from e
in systemRoleRepository.Entities
where e.User.Username.Equals(userService.CurrentUser.Username)
select e
).ToList();
(where子句使用userService)。
該對象與編譯器正在聲明的對象相同,並聲明為:
private readonly IUserService userService;
為了確定它實際上正在被使用,如果我注釋掉該聲明,Mono編譯器將對該LINQ查詢拋出錯誤並說未聲明userService。
我是否遺漏了一些確實很明顯的東西,或者這是單聲道編譯器中的錯誤(順便說一句,RHEL 5.5在2.8.1上的dmcs)。
這幾乎可以肯定是一個錯誤。 請提交到Novell的錯誤跟蹤器 。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.