You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Red main: AotConverterScanTests.SkipsConversionsBlockedByObsoleteError fails on net472 (IsExternalInit) #7329
Red main: SkipsConversionsBlockedByObsoleteError fails on net472
main run 41311511530 (commit d43977c, #7317), job modularpipeline (windows-latest), module RunSourceGeneratorTestsModule, TUnit.Core.SourceGenerator.Tests on net472:
failed SkipsConversionsBlockedByObsoleteError
AssertionException: Expected to be empty
but collection contains items: [(4,44): error CS0518: Predefined type 'System.Runtime.CompilerServices.IsExternalInit' is not defined or imported]
tests/TUnit.Core.SourceGenerator.Tests/AotConverterScanTests.cs compiles a fixture that declares public readonly record struct Token(string Value). A positional record's init accessor needs IsExternalInit, and the net472 reference set (ReferencesHelper.References) does not include it. The test passes on net8.0+ and fails on net472. Every PR inherits the failure (for example #7321).
Expected: the fixture compiles against every target framework of the test project.
Activity
test(sourcegen): avoid record struct in AotConverterScanTests fixture…