Mono throwing warning that I don't think is correct
Mono is throwing the warning:
warning CS0414: The private field 'Convergence.Core.Services.PermissionService.userService' is assigned but its value is never used
Which is strange, since it is most certainly used:
For instance:
var systemRoles = (
from e
in systemRoleRepository.Entities
where e.User.Username.Equals(userService.CurrentUser.Username)
select e
).ToList();
(The where clause makes use of userService).
The object is the same object that the comp开发者_JS百科iler is comlaining about, and is declared as:
private readonly IUserService userService;
To determine that it is in fact being used, if I comment out the declaration, the Mono compiler throws and error on that LINQ query saying userService isn't declared.
Am I missing something really really obvious, or is this a bug in the mono compiler (dmcs on 2.8.1 on RHEL 5.5 by the way).
This is almost certainly a bug. Please file it at Novell's bug tracker.
精彩评论