• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

neo-project / neo-devpack-dotnet / 21435679396

28 Jan 2026 03:16AM UTC coverage: 74.179% (-0.003%) from 74.182%
21435679396

push

github

web-flow
fix: handle partial class compilation with correct SemanticModel (#1488)

* fix: handle partial class compilation with correct SemanticModel

- Add SemanticModelExtensions.GetModelForNode() helper method
- Fix Expression.cs to check syntax tree before GetConstantValue
- Fix InvocationExpression.cs to get correct model for GetSymbolInfo
- Fix SourceConvert.cs to get correct model for GetTypeInfo

This fixes NC5001 errors when compiling contracts with partial classes
(e.g., Example.SmartContract.NFT) where syntax nodes may come from
different syntax trees than the current semantic model.

Closes #1363

* test: add unit tests for partial class cross-file compilation

Tests the fix for issue #1363 where syntax nodes from different
syntax trees caused NC5001 errors during compilation.

New tests cover:
- Cross-file method invocations in partial classes
- Expression-bodied members using constants from other files
- Complex expressions using both constants and methods across files

* refactor: use GetModelForNode helper in TryConvertConstant

Apply review suggestion to use the GetModelForNode extension method
instead of inline syntax tree check. This allows constant evaluation
to work across partial class files.

6085 of 8971 branches covered (67.83%)

Branch coverage included in aggregate %.

10 of 14 new or added lines in 4 files covered. (71.43%)

15817 of 20555 relevant lines covered (76.95%)

21547.02 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

71.43
/src/Neo.Compiler.CSharp/MethodConvert/Helpers/SemanticModelExtensions.cs


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc