Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LC0068 Rule0068CheckObjectPermission - InvalidCastException [AL preview - v14.0.1070882] #724

Open
pri-kise opened this issue Aug 13, 2024 · 1 comment

Comments

@pri-kise
Copy link

Since today I receive the following warning:

Analyzer 'BusinessCentral.LinterCop.Design.Rule0068CheckObjectPermission' threw an exception of type 'System.InvalidCastException' with message 'System.InvalidCastException: Unable to cast object of type 'Microsoft.Dynamics.Nav.CodeAnalysis.Symbols.SourceReportColumnSymbol' to type 'Microsoft.Dynamics.Nav.CodeAnalysis.IMethodSymbol'.
   at BusinessCentral.LinterCop.Design.Rule0068CheckObjectPermission.CheckObjectPermission(OperationAnalysisContext ctx)
   at Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics.AnalyzerExecutor.<>c__DisplayClass54_1.<ExecuteOperationAction>b__1() in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\DiagnosticAnalyzer\AnalyzerExecutor.cs:line 773
   at Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics.AnalyzerExecutor.ExecuteAndCatchIfThrows_NoLock(DiagnosticAnalyzer analyzer, Action analyze, Nullable`1 info) in X:\Prod\Microsoft.Dynamics.Nav.CodeAnalysis\DiagnosticAnalyzer\AnalyzerExecutor.cs:line 1088'

AL Language: v14.0.1070882 (pre-release)

@StefanMaron
Copy link
Owner

I dont know what code can cause this, but I have added a type check to prevent that error from happening.
Let me know if this error still occurs on the latest version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants