diff --git a/InstallerSamples/CheckedTasks/LightPT/УрокМассивы/Tasks.pas b/InstallerSamples/CheckedTasks/LightPT/УрокМассивы/Tasks.pas index dfb6e3439..b7ace82c7 100644 --- a/InstallerSamples/CheckedTasks/LightPT/УрокМассивы/Tasks.pas +++ b/InstallerSamples/CheckedTasks/LightPT/УрокМассивы/Tasks.pas @@ -19,7 +19,7 @@ begin GenerateTests(10, tInt(1,10) * n); var m := MatrByRow(3,4,IntArr(n)); - CheckOutput(m.Row(1).Max,m.Col(2).Min,m.Col(3).Sum); + CheckOutputSeq(m.ElementsByRow + |m.Row(1).Max,m.Col(2).Min,m.Col(3).Sum|); end; end; end; diff --git a/TreeConverter/TreeRealization/type_table.cs b/TreeConverter/TreeRealization/type_table.cs index ff2367a92..a69c7fe3f 100644 --- a/TreeConverter/TreeRealization/type_table.cs +++ b/TreeConverter/TreeRealization/type_table.cs @@ -601,11 +601,11 @@ namespace PascalABCCompiler.TreeRealization // Тут можно проверить на ковариантность // еще где то надо проверять, что IEnumerable -> IEnumerable, но здесь base_class предполагает, // что это - класс, и рассматривает все его интерфейсы, упуская ситуацию, когда base_class - это и есть интерфейс - else if ((cgitn != null || ctn != null) && (bcgitn != null || bcctn != null)) // SSM 19/04 //else if (cgitn != null && (bcgitn != null || bcctn != null)) //else if ((cgitn != null || ctn != null) && bcgitn != null) //else if (cgitn != null && bcgitn != null) //else if (cgitn != null && bcgitn != null || ctn != null && bcctn != null) // SSM 18/04 немного большие ограничения + else if ((cgitn != null || ctn != null) && (bcgitn != null || bcctn != null)) // SSM 19/04 { compiled_type_node interf_original_generic = cgitn != null ? cgitn.original_generic as compiled_type_node : ctn.original_generic as compiled_type_node; compiled_type_node base_original_generic = bcgitn != null ? bcgitn.original_generic as compiled_type_node : bcctn.original_generic as compiled_type_node; @@ -637,7 +637,7 @@ namespace PascalABCCompiler.TreeRealization // ctcgi.compiled_type - это System.Type if ((interf_compiled_type.GetGenericArguments()[i].GenericParameterAttributes & System.Reflection.GenericParameterAttributes.Covariant) != 0) { - if (is_derived(base_instance_params[i], interf_instance_params[i], false)) + if (is_derived(base_instance_params[i], interf_instance_params[i], false)) // is_derived(object , T, false) = true, что неверно - T - не наследник object!!! { // OK } diff --git a/bin/Lib/Tasks1Loops.pas b/bin/Lib/Tasks1Loops.pas index 7425bfee9..91f79360c 100644 --- a/bin/Lib/Tasks1Loops.pas +++ b/bin/Lib/Tasks1Loops.pas @@ -544,9 +544,15 @@ begin CheckOutput(3 in InputListAsIntegers); end; 'Break2': begin + TestCount := 3; + GenerateTestData := tnum -> begin + case tnum of + 1: InputList.AddTestData(|1,2,8,4,5,6,7,1,2,9|); + 2: InputList.AddTestData(|1,1,3|); + 3: InputList.AddTestData(|7,6,4,3|); + end; + end; var n := 10; - CheckData(Input := |cInt|*n); - GenerateTests(20,tInt(1,10)*n); var f := false; for var i:=0 to n-1 do begin @@ -561,9 +567,15 @@ begin end; 'Break3': begin var n := 10; - CheckData(Input := |cInt|*n); - GenerateTests(10,tInt(0,10)*n); - var f := -1; + TestCount := 3; + GenerateTestData := tnum -> begin + case tnum of + 1: InputList.AddTestData(|1,2,3,4,5,6,7,1,2,3|); + 2: InputList.AddTestData(|1,1,9|); + 3: InputList.AddTestData(|7,6,8|); + end; + end; + var f := 0; for var i:=0 to n-1 do begin var x := Int(i);