From 9680e844c258f67a3c5ff7f52f0293c86b8e8c64 Mon Sep 17 00:00:00 2001 From: Bengu Li Date: Fri, 22 May 2015 13:42:04 -0700 Subject: [PATCH] Add all JIT/Generics test cases Add all remaining JIT/Generics test cases for JIT. Related proj, config, and sln files added and updated. Passed build, buildtest, runtest. --- tests/src/AllTestProjects.sln | 229 +- .../ConstrainedCall/ConstrainedCall.csproj | 19 + tests/src/JIT/Generics/ConstrainedCall/app.config | 27 + tests/src/JIT/Generics/ConstrainedCall/class1.cs | 111 + tests/src/JIT/Generics/ConstrainedCall/class2.cs | 120 + .../JIT/Generics/ConstrainedCall/cs_template.proj | 42 + .../JIT/Generics/ConstrainedCall/packages.config | 6 + tests/src/JIT/Generics/ConstrainedCall/vt1.cs | 110 + tests/src/JIT/Generics/ConstrainedCall/vt2.cs | 74 + tests/src/JIT/Generics/ConstrainedCall/vt3.cs | 75 + tests/src/JIT/Generics/ConstrainedCall/vt4.cs | 120 + .../JIT/Generics/Constraints/Call_instance01.cs | 87 + .../src/JIT/Generics/Constraints/Call_static01.cs | 78 + .../JIT/Generics/Constraints/Constraints.csproj | 19 + .../JIT/Generics/Constraints/Convert_instance01.cs | 81 + .../JIT/Generics/Constraints/Convert_static01.cs | 73 + .../Generics/Constraints/Transitive_instance01.cs | 74 + .../Generics/Constraints/Transitive_static01.cs | 66 + tests/src/JIT/Generics/Constraints/app.config | 27 + .../src/JIT/Generics/Constraints/cs_template.proj | 42 + tests/src/JIT/Generics/Constraints/packages.config | 6 + .../JIT/Generics/Conversions/Boxing/Boxing.csproj | 19 + .../src/JIT/Generics/Conversions/Boxing/app.config | 27 + .../JIT/Generics/Conversions/Boxing/box_unbox01.cs | 73 + .../Generics/Conversions/Boxing/cs_template.proj | 42 + .../Generics/Conversions/Boxing/packages.config | 6 + .../Generics/Conversions/Reference/GenToGen01.cs | 137 + .../Generics/Conversions/Reference/GenToGen02.cs | 125 + .../Generics/Conversions/Reference/GenToGen03.cs | 125 + .../Conversions/Reference/GenToNonGen01.cs | 122 + .../Conversions/Reference/GenToNonGen02.cs | 116 + .../Conversions/Reference/GenToNonGen03.cs | 116 + .../Conversions/Reference/NonGenToGen01.cs | 154 + .../Conversions/Reference/NonGenToGen02.cs | 147 + .../Conversions/Reference/NonGenToGen03.cs | 147 + .../Conversions/Reference/Reference.csproj | 19 + .../JIT/Generics/Conversions/Reference/app.config | 27 + .../Conversions/Reference/cs_template.proj | 42 + .../Generics/Conversions/Reference/packages.config | 6 + tests/src/JIT/Generics/Coverage/Coverage.csproj | 19 + tests/src/JIT/Generics/Coverage/app.config | 27 + tests/src/JIT/Generics/Coverage/chaos55915408cs.cs | 613 +++ tests/src/JIT/Generics/Coverage/chaos56200037cs.cs | 2822 +++++++++++++ tests/src/JIT/Generics/Coverage/chaos65204782cs.cs | 4238 ++++++++++++++++++++ tests/src/JIT/Generics/Coverage/cs_template.proj | 42 + tests/src/JIT/Generics/Coverage/packages.config | 6 + .../Generics/Instantiation/Classes/BaseClass01.cs | 190 + .../Generics/Instantiation/Classes/BaseClass02.cs | 152 + .../Generics/Instantiation/Classes/BaseClass03.cs | 161 + .../Generics/Instantiation/Classes/Baseclass04.cs | 178 + .../Generics/Instantiation/Classes/Baseclass05.cs | 109 + .../Generics/Instantiation/Classes/Classes.csproj | 19 + .../JIT/Generics/Instantiation/Classes/app.config | 27 + .../JIT/Generics/Instantiation/Classes/class01.cs | 142 + .../JIT/Generics/Instantiation/Classes/class02.cs | 169 + .../JIT/Generics/Instantiation/Classes/class03.cs | 99 + .../Instantiation/Classes/cs_template.proj | 42 + .../Generics/Instantiation/Classes/packages.config | 6 + .../Generics/Instantiation/Interfaces/Class01.cs | 341 ++ .../Generics/Instantiation/Interfaces/Class02.cs | 113 + .../Generics/Instantiation/Interfaces/Class03.cs | 115 + .../Generics/Instantiation/Interfaces/Class04.cs | 341 ++ .../Generics/Instantiation/Interfaces/Class05.cs | 352 ++ .../Instantiation/Interfaces/Interfaces.csproj | 19 + .../Generics/Instantiation/Interfaces/Struct01.cs | 341 ++ .../Generics/Instantiation/Interfaces/Struct02.cs | 113 + .../Generics/Instantiation/Interfaces/Struct03.cs | 115 + .../Generics/Instantiation/Interfaces/Struct04.cs | 341 ++ .../Generics/Instantiation/Interfaces/Struct05.cs | 352 ++ .../Generics/Instantiation/Interfaces/app.config | 27 + .../Instantiation/Interfaces/cs_template.proj | 42 + .../Instantiation/Interfaces/packages.config | 6 + .../Generics/Instantiation/Structs/Structs.csproj | 19 + .../JIT/Generics/Instantiation/Structs/app.config | 27 + .../Instantiation/Structs/cs_template.proj | 42 + .../Generics/Instantiation/Structs/packages.config | 6 + .../JIT/Generics/Instantiation/Structs/struct01.cs | 141 + .../JIT/Generics/Instantiation/Structs/struct02.cs | 169 + .../JIT/Generics/Instantiation/Structs/struct03.cs | 99 + tests/src/JIT/Generics/Locals/Locals.csproj | 19 + tests/src/JIT/Generics/Locals/app.config | 27 + tests/src/JIT/Generics/Locals/cs_template.proj | 42 + .../Generics/Locals/instance_assignment_class01.cs | 79 + .../Locals/instance_assignment_struct01.cs | 79 + .../Generics/Locals/instance_equalnull_class01.cs | 81 + .../Generics/Locals/instance_equalnull_struct01.cs | 81 + .../Generics/Locals/instance_passing_class01.cs | 109 + .../Generics/Locals/instance_passing_struct01.cs | 109 + tests/src/JIT/Generics/Locals/packages.config | 6 + .../Generics/Locals/static_assignment_class01.cs | 79 + .../Generics/Locals/static_assignment_struct01.cs | 79 + .../Generics/Locals/static_equalnull_class01.cs | 81 + .../Generics/Locals/static_equalnull_struct01.cs | 81 + .../JIT/Generics/Locals/static_passing_class01.cs | 109 + .../JIT/Generics/Locals/static_passing_struct01.cs | 109 + .../JIT/Generics/MemberAccess/MemberAccess.csproj | 19 + tests/src/JIT/Generics/MemberAccess/app.config | 27 + .../JIT/Generics/MemberAccess/class_instance01.cs | 142 + .../JIT/Generics/MemberAccess/class_static01.cs | 113 + .../src/JIT/Generics/MemberAccess/cs_template.proj | 42 + .../JIT/Generics/MemberAccess/interface_class01.cs | 134 + .../JIT/Generics/MemberAccess/interface_class02.cs | 169 + .../Generics/MemberAccess/interface_struct01.cs | 115 + .../Generics/MemberAccess/interface_struct02.cs | 139 + .../src/JIT/Generics/MemberAccess/packages.config | 6 + .../JIT/Generics/MemberAccess/struct_instance01.cs | 122 + .../JIT/Generics/MemberAccess/struct_static01.cs | 113 + .../src/JIT/Generics/Parameters/Parameters.csproj | 19 + tests/src/JIT/Generics/Parameters/app.config | 27 + tests/src/JIT/Generics/Parameters/cs_template.proj | 42 + .../Parameters/instance_assignment_class01.cs | 108 + .../Parameters/instance_assignment_struct01.cs | 108 + .../Parameters/instance_equalnull_class01.cs | 80 + .../Parameters/instance_equalnull_struct01.cs | 80 + .../Parameters/instance_passing_class01.cs | 106 + .../Parameters/instance_passing_struct01.cs | 106 + tests/src/JIT/Generics/Parameters/packages.config | 6 + .../Parameters/static_assignment_class01.cs | 108 + .../Parameters/static_assignment_struct01.cs | 108 + .../Parameters/static_equalnull_class01.cs | 80 + .../Parameters/static_equalnull_struct01.cs | 80 + .../Generics/Parameters/static_passing_class01.cs | 106 + .../Generics/Parameters/static_passing_struct01.cs | 106 + .../Generics/TypeParameters/TypeParameters.csproj | 19 + tests/src/JIT/Generics/TypeParameters/app.config | 27 + .../JIT/Generics/TypeParameters/cs_template.proj | 42 + .../JIT/Generics/TypeParameters/default_class01.cs | 134 + .../Generics/TypeParameters/default_struct01.cs | 134 + .../JIT/Generics/TypeParameters/packages.config | 6 + tests/src/JIT/Generics/Typeof/Struct02.cs | 169 + tests/src/JIT/Generics/Typeof/TypeOf.csproj | 19 + tests/src/JIT/Generics/Typeof/app.config | 27 + tests/src/JIT/Generics/Typeof/class01.cs | 142 + tests/src/JIT/Generics/Typeof/class02.cs | 169 + tests/src/JIT/Generics/Typeof/class03.cs | 99 + tests/src/JIT/Generics/Typeof/cs_template.proj | 42 + tests/src/JIT/Generics/Typeof/dynamicTypes.cs | 778 ++++ tests/src/JIT/Generics/Typeof/objectBoxing.cs | 363 ++ tests/src/JIT/Generics/Typeof/packages.config | 6 + tests/src/JIT/Generics/Typeof/refTypesdynamic.cs | 485 +++ tests/src/JIT/Generics/Typeof/struct01.cs | 142 + tests/src/JIT/Generics/Typeof/struct03.cs | 99 + tests/src/JIT/Generics/Typeof/valueTypeBoxing.cs | 234 ++ 143 files changed, 21832 insertions(+), 3 deletions(-) create mode 100644 tests/src/JIT/Generics/ConstrainedCall/ConstrainedCall.csproj create mode 100644 tests/src/JIT/Generics/ConstrainedCall/app.config create mode 100644 tests/src/JIT/Generics/ConstrainedCall/class1.cs create mode 100644 tests/src/JIT/Generics/ConstrainedCall/class2.cs create mode 100644 tests/src/JIT/Generics/ConstrainedCall/cs_template.proj create mode 100644 tests/src/JIT/Generics/ConstrainedCall/packages.config create mode 100644 tests/src/JIT/Generics/ConstrainedCall/vt1.cs create mode 100644 tests/src/JIT/Generics/ConstrainedCall/vt2.cs create mode 100644 tests/src/JIT/Generics/ConstrainedCall/vt3.cs create mode 100644 tests/src/JIT/Generics/ConstrainedCall/vt4.cs create mode 100644 tests/src/JIT/Generics/Constraints/Call_instance01.cs create mode 100644 tests/src/JIT/Generics/Constraints/Call_static01.cs create mode 100644 tests/src/JIT/Generics/Constraints/Constraints.csproj create mode 100644 tests/src/JIT/Generics/Constraints/Convert_instance01.cs create mode 100644 tests/src/JIT/Generics/Constraints/Convert_static01.cs create mode 100644 tests/src/JIT/Generics/Constraints/Transitive_instance01.cs create mode 100644 tests/src/JIT/Generics/Constraints/Transitive_static01.cs create mode 100644 tests/src/JIT/Generics/Constraints/app.config create mode 100644 tests/src/JIT/Generics/Constraints/cs_template.proj create mode 100644 tests/src/JIT/Generics/Constraints/packages.config create mode 100644 tests/src/JIT/Generics/Conversions/Boxing/Boxing.csproj create mode 100644 tests/src/JIT/Generics/Conversions/Boxing/app.config create mode 100644 tests/src/JIT/Generics/Conversions/Boxing/box_unbox01.cs create mode 100644 tests/src/JIT/Generics/Conversions/Boxing/cs_template.proj create mode 100644 tests/src/JIT/Generics/Conversions/Boxing/packages.config create mode 100644 tests/src/JIT/Generics/Conversions/Reference/GenToGen01.cs create mode 100644 tests/src/JIT/Generics/Conversions/Reference/GenToGen02.cs create mode 100644 tests/src/JIT/Generics/Conversions/Reference/GenToGen03.cs create mode 100644 tests/src/JIT/Generics/Conversions/Reference/GenToNonGen01.cs create mode 100644 tests/src/JIT/Generics/Conversions/Reference/GenToNonGen02.cs create mode 100644 tests/src/JIT/Generics/Conversions/Reference/GenToNonGen03.cs create mode 100644 tests/src/JIT/Generics/Conversions/Reference/NonGenToGen01.cs create mode 100644 tests/src/JIT/Generics/Conversions/Reference/NonGenToGen02.cs create mode 100644 tests/src/JIT/Generics/Conversions/Reference/NonGenToGen03.cs create mode 100644 tests/src/JIT/Generics/Conversions/Reference/Reference.csproj create mode 100644 tests/src/JIT/Generics/Conversions/Reference/app.config create mode 100644 tests/src/JIT/Generics/Conversions/Reference/cs_template.proj create mode 100644 tests/src/JIT/Generics/Conversions/Reference/packages.config create mode 100644 tests/src/JIT/Generics/Coverage/Coverage.csproj create mode 100644 tests/src/JIT/Generics/Coverage/app.config create mode 100644 tests/src/JIT/Generics/Coverage/chaos55915408cs.cs create mode 100644 tests/src/JIT/Generics/Coverage/chaos56200037cs.cs create mode 100644 tests/src/JIT/Generics/Coverage/chaos65204782cs.cs create mode 100644 tests/src/JIT/Generics/Coverage/cs_template.proj create mode 100644 tests/src/JIT/Generics/Coverage/packages.config create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/BaseClass01.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/BaseClass02.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/BaseClass03.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/Baseclass04.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/Baseclass05.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/Classes.csproj create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/app.config create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/class01.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/class02.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/class03.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/cs_template.proj create mode 100644 tests/src/JIT/Generics/Instantiation/Classes/packages.config create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/Class01.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/Class02.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/Class03.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/Class04.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/Class05.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/Interfaces.csproj create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/Struct01.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/Struct02.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/Struct03.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/Struct04.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/Struct05.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/app.config create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/cs_template.proj create mode 100644 tests/src/JIT/Generics/Instantiation/Interfaces/packages.config create mode 100644 tests/src/JIT/Generics/Instantiation/Structs/Structs.csproj create mode 100644 tests/src/JIT/Generics/Instantiation/Structs/app.config create mode 100644 tests/src/JIT/Generics/Instantiation/Structs/cs_template.proj create mode 100644 tests/src/JIT/Generics/Instantiation/Structs/packages.config create mode 100644 tests/src/JIT/Generics/Instantiation/Structs/struct01.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Structs/struct02.cs create mode 100644 tests/src/JIT/Generics/Instantiation/Structs/struct03.cs create mode 100644 tests/src/JIT/Generics/Locals/Locals.csproj create mode 100644 tests/src/JIT/Generics/Locals/app.config create mode 100644 tests/src/JIT/Generics/Locals/cs_template.proj create mode 100644 tests/src/JIT/Generics/Locals/instance_assignment_class01.cs create mode 100644 tests/src/JIT/Generics/Locals/instance_assignment_struct01.cs create mode 100644 tests/src/JIT/Generics/Locals/instance_equalnull_class01.cs create mode 100644 tests/src/JIT/Generics/Locals/instance_equalnull_struct01.cs create mode 100644 tests/src/JIT/Generics/Locals/instance_passing_class01.cs create mode 100644 tests/src/JIT/Generics/Locals/instance_passing_struct01.cs create mode 100644 tests/src/JIT/Generics/Locals/packages.config create mode 100644 tests/src/JIT/Generics/Locals/static_assignment_class01.cs create mode 100644 tests/src/JIT/Generics/Locals/static_assignment_struct01.cs create mode 100644 tests/src/JIT/Generics/Locals/static_equalnull_class01.cs create mode 100644 tests/src/JIT/Generics/Locals/static_equalnull_struct01.cs create mode 100644 tests/src/JIT/Generics/Locals/static_passing_class01.cs create mode 100644 tests/src/JIT/Generics/Locals/static_passing_struct01.cs create mode 100644 tests/src/JIT/Generics/MemberAccess/MemberAccess.csproj create mode 100644 tests/src/JIT/Generics/MemberAccess/app.config create mode 100644 tests/src/JIT/Generics/MemberAccess/class_instance01.cs create mode 100644 tests/src/JIT/Generics/MemberAccess/class_static01.cs create mode 100644 tests/src/JIT/Generics/MemberAccess/cs_template.proj create mode 100644 tests/src/JIT/Generics/MemberAccess/interface_class01.cs create mode 100644 tests/src/JIT/Generics/MemberAccess/interface_class02.cs create mode 100644 tests/src/JIT/Generics/MemberAccess/interface_struct01.cs create mode 100644 tests/src/JIT/Generics/MemberAccess/interface_struct02.cs create mode 100644 tests/src/JIT/Generics/MemberAccess/packages.config create mode 100644 tests/src/JIT/Generics/MemberAccess/struct_instance01.cs create mode 100644 tests/src/JIT/Generics/MemberAccess/struct_static01.cs create mode 100644 tests/src/JIT/Generics/Parameters/Parameters.csproj create mode 100644 tests/src/JIT/Generics/Parameters/app.config create mode 100644 tests/src/JIT/Generics/Parameters/cs_template.proj create mode 100644 tests/src/JIT/Generics/Parameters/instance_assignment_class01.cs create mode 100644 tests/src/JIT/Generics/Parameters/instance_assignment_struct01.cs create mode 100644 tests/src/JIT/Generics/Parameters/instance_equalnull_class01.cs create mode 100644 tests/src/JIT/Generics/Parameters/instance_equalnull_struct01.cs create mode 100644 tests/src/JIT/Generics/Parameters/instance_passing_class01.cs create mode 100644 tests/src/JIT/Generics/Parameters/instance_passing_struct01.cs create mode 100644 tests/src/JIT/Generics/Parameters/packages.config create mode 100644 tests/src/JIT/Generics/Parameters/static_assignment_class01.cs create mode 100644 tests/src/JIT/Generics/Parameters/static_assignment_struct01.cs create mode 100644 tests/src/JIT/Generics/Parameters/static_equalnull_class01.cs create mode 100644 tests/src/JIT/Generics/Parameters/static_equalnull_struct01.cs create mode 100644 tests/src/JIT/Generics/Parameters/static_passing_class01.cs create mode 100644 tests/src/JIT/Generics/Parameters/static_passing_struct01.cs create mode 100644 tests/src/JIT/Generics/TypeParameters/TypeParameters.csproj create mode 100644 tests/src/JIT/Generics/TypeParameters/app.config create mode 100644 tests/src/JIT/Generics/TypeParameters/cs_template.proj create mode 100644 tests/src/JIT/Generics/TypeParameters/default_class01.cs create mode 100644 tests/src/JIT/Generics/TypeParameters/default_struct01.cs create mode 100644 tests/src/JIT/Generics/TypeParameters/packages.config create mode 100644 tests/src/JIT/Generics/Typeof/Struct02.cs create mode 100644 tests/src/JIT/Generics/Typeof/TypeOf.csproj create mode 100644 tests/src/JIT/Generics/Typeof/app.config create mode 100644 tests/src/JIT/Generics/Typeof/class01.cs create mode 100644 tests/src/JIT/Generics/Typeof/class02.cs create mode 100644 tests/src/JIT/Generics/Typeof/class03.cs create mode 100644 tests/src/JIT/Generics/Typeof/cs_template.proj create mode 100644 tests/src/JIT/Generics/Typeof/dynamicTypes.cs create mode 100644 tests/src/JIT/Generics/Typeof/objectBoxing.cs create mode 100644 tests/src/JIT/Generics/Typeof/packages.config create mode 100644 tests/src/JIT/Generics/Typeof/refTypesdynamic.cs create mode 100644 tests/src/JIT/Generics/Typeof/struct01.cs create mode 100644 tests/src/JIT/Generics/Typeof/struct03.cs create mode 100644 tests/src/JIT/Generics/Typeof/valueTypeBoxing.cs diff --git a/tests/src/AllTestProjects.sln b/tests/src/AllTestProjects.sln index 78a4ecc..160e9b9 100644 --- a/tests/src/AllTestProjects.sln +++ b/tests/src/AllTestProjects.sln @@ -171,7 +171,62 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NaN", "JIT\Methodical\NaN\N EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypedReference", "JIT\Directed\TypedReference\TypedReference.csproj", "{47849C79-F7B8-47C6-BBA7-8E6FCE66B9F1}" EndProject - +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ConstrainedCall", "ConstrainedCall", "{2CBD872D-5257-46BD-8331-C73E4E8649B0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConstrainedCall", "JIT\Generics\ConstrainedCall\ConstrainedCall.csproj", "{A8F91D1C-92D3-4385-9EA0-E646003015B3}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Contraints", "Contraints", "{8B7F7CB1-2377-45A1-B24F-01B1ECEEB49B}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Constraints", "JIT\Generics\Constraints\Constraints.csproj", "{6898B405-0970-4406-BA98-F50CDAB1A849}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Conversions", "Conversions", "{F24A8F3D-8C25-4283-A95B-8BB9F0722464}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Boxing", "Boxing", "{83AEA271-7FBD-4218-91D5-056796194EDC}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Reference", "Reference", "{0C6514BE-9895-4361-9C9F-4D2C3E5DCAE7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Boxing", "JIT\Generics\Conversions\Boxing\Boxing.csproj", "{E348F96E-80F3-4D56-AE70-F55FC1EEF88E}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Reference", "JIT\Generics\Conversions\Reference\Reference.csproj", "{317F35A1-3733-4F67-9BF3-C1C567B0D85E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Converage", "Converage", "{B8C4748A-787E-4ED4-A290-3A9A8C3B8EC2}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Coverage", "JIT\Generics\Coverage\Coverage.csproj", "{B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Instantiation", "Instantiation", "{8CD7C05F-F440-4AE5-A5D3-195CA918865B}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Classes", "Classes", "{733E3760-7FC1-4A1C-B04E-6FAEC969D9E1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Classes", "JIT\Generics\Instantiation\Classes\Classes.csproj", "{99D58DA0-7FB7-48A0-9692-AB5141DF3F3C}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Interfaces", "Interfaces", "{DF82AF85-2649-4708-A0DF-07E91026422F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interfaces", "JIT\Generics\Instantiation\Interfaces\Interfaces.csproj", "{C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Structs", "Structs", "{0014E7B8-2130-4CED-85F1-5E7E246BB6DC}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Structs", "JIT\Generics\Instantiation\Structs\Structs.csproj", "{0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Locals", "Locals", "{C2A681ED-16D8-40EE-BDD3-AEF624EA2DDE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Locals", "JIT\Generics\Locals\Locals.csproj", "{9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MemberAccess", "MemberAccess", "{9D7E0A3F-37EE-4950-B5C9-280DEE1FD616}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MemberAccess", "JIT\Generics\MemberAccess\MemberAccess.csproj", "{FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Parameters", "Parameters", "{8F32B13F-C23D-42D5-95F4-88DA41A3DF04}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Parameters", "JIT\Generics\Parameters\Parameters.csproj", "{416E5572-FF88-4F90-A3B0-8ACD94406591}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "TypeParameters", "TypeParameters", "{C299AD86-AD7A-4DD3-80A7-CD6BE9485D9A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeParameters", "JIT\Generics\TypeParameters\TypeParameters.csproj", "{8022030D-7B08-4433-BEC3-BAE69D4082E0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Typeof", "Typeof", "{3C6F738C-461F-48A9-9FCF-3AC2126B84CF}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TypeOf", "JIT\Generics\Typeof\TypeOf.csproj", "{8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -500,6 +555,146 @@ Global {5FEB6365-EB6C-4D4D-9DAA-E5E2EEA5A1FF}.Release|Mixed Platforms.Build.0 = Release|x64 {5FEB6365-EB6C-4D4D-9DAA-E5E2EEA5A1FF}.Release|x64.ActiveCfg = Release|x64 {5FEB6365-EB6C-4D4D-9DAA-E5E2EEA5A1FF}.Release|x64.Build.0 = Release|x64 + {47849C79-F7B8-47C6-BBA7-8E6FCE66B9F1}.Debug|Any CPU.ActiveCfg = Debug|x64 + {47849C79-F7B8-47C6-BBA7-8E6FCE66B9F1}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {47849C79-F7B8-47C6-BBA7-8E6FCE66B9F1}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {47849C79-F7B8-47C6-BBA7-8E6FCE66B9F1}.Debug|x64.ActiveCfg = Debug|x64 + {47849C79-F7B8-47C6-BBA7-8E6FCE66B9F1}.Debug|x64.Build.0 = Debug|x64 + {47849C79-F7B8-47C6-BBA7-8E6FCE66B9F1}.Release|Any CPU.ActiveCfg = Release|x64 + {47849C79-F7B8-47C6-BBA7-8E6FCE66B9F1}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {47849C79-F7B8-47C6-BBA7-8E6FCE66B9F1}.Release|Mixed Platforms.Build.0 = Release|x64 + {47849C79-F7B8-47C6-BBA7-8E6FCE66B9F1}.Release|x64.ActiveCfg = Release|x64 + {47849C79-F7B8-47C6-BBA7-8E6FCE66B9F1}.Release|x64.Build.0 = Release|x64 + {A8F91D1C-92D3-4385-9EA0-E646003015B3}.Debug|Any CPU.ActiveCfg = Debug|x64 + {A8F91D1C-92D3-4385-9EA0-E646003015B3}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {A8F91D1C-92D3-4385-9EA0-E646003015B3}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {A8F91D1C-92D3-4385-9EA0-E646003015B3}.Debug|x64.ActiveCfg = Debug|x64 + {A8F91D1C-92D3-4385-9EA0-E646003015B3}.Debug|x64.Build.0 = Debug|x64 + {A8F91D1C-92D3-4385-9EA0-E646003015B3}.Release|Any CPU.ActiveCfg = Release|x64 + {A8F91D1C-92D3-4385-9EA0-E646003015B3}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {A8F91D1C-92D3-4385-9EA0-E646003015B3}.Release|Mixed Platforms.Build.0 = Release|x64 + {A8F91D1C-92D3-4385-9EA0-E646003015B3}.Release|x64.ActiveCfg = Release|x64 + {A8F91D1C-92D3-4385-9EA0-E646003015B3}.Release|x64.Build.0 = Release|x64 + {6898B405-0970-4406-BA98-F50CDAB1A849}.Debug|Any CPU.ActiveCfg = Debug|x64 + {6898B405-0970-4406-BA98-F50CDAB1A849}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {6898B405-0970-4406-BA98-F50CDAB1A849}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {6898B405-0970-4406-BA98-F50CDAB1A849}.Debug|x64.ActiveCfg = Debug|x64 + {6898B405-0970-4406-BA98-F50CDAB1A849}.Debug|x64.Build.0 = Debug|x64 + {6898B405-0970-4406-BA98-F50CDAB1A849}.Release|Any CPU.ActiveCfg = Release|x64 + {6898B405-0970-4406-BA98-F50CDAB1A849}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {6898B405-0970-4406-BA98-F50CDAB1A849}.Release|Mixed Platforms.Build.0 = Release|x64 + {6898B405-0970-4406-BA98-F50CDAB1A849}.Release|x64.ActiveCfg = Release|x64 + {6898B405-0970-4406-BA98-F50CDAB1A849}.Release|x64.Build.0 = Release|x64 + {E348F96E-80F3-4D56-AE70-F55FC1EEF88E}.Debug|Any CPU.ActiveCfg = Debug|x64 + {E348F96E-80F3-4D56-AE70-F55FC1EEF88E}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {E348F96E-80F3-4D56-AE70-F55FC1EEF88E}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {E348F96E-80F3-4D56-AE70-F55FC1EEF88E}.Debug|x64.ActiveCfg = Debug|x64 + {E348F96E-80F3-4D56-AE70-F55FC1EEF88E}.Debug|x64.Build.0 = Debug|x64 + {E348F96E-80F3-4D56-AE70-F55FC1EEF88E}.Release|Any CPU.ActiveCfg = Release|x64 + {E348F96E-80F3-4D56-AE70-F55FC1EEF88E}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {E348F96E-80F3-4D56-AE70-F55FC1EEF88E}.Release|Mixed Platforms.Build.0 = Release|x64 + {E348F96E-80F3-4D56-AE70-F55FC1EEF88E}.Release|x64.ActiveCfg = Release|x64 + {E348F96E-80F3-4D56-AE70-F55FC1EEF88E}.Release|x64.Build.0 = Release|x64 + {317F35A1-3733-4F67-9BF3-C1C567B0D85E}.Debug|Any CPU.ActiveCfg = Debug|x64 + {317F35A1-3733-4F67-9BF3-C1C567B0D85E}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {317F35A1-3733-4F67-9BF3-C1C567B0D85E}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {317F35A1-3733-4F67-9BF3-C1C567B0D85E}.Debug|x64.ActiveCfg = Debug|x64 + {317F35A1-3733-4F67-9BF3-C1C567B0D85E}.Debug|x64.Build.0 = Debug|x64 + {317F35A1-3733-4F67-9BF3-C1C567B0D85E}.Release|Any CPU.ActiveCfg = Release|x64 + {317F35A1-3733-4F67-9BF3-C1C567B0D85E}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {317F35A1-3733-4F67-9BF3-C1C567B0D85E}.Release|Mixed Platforms.Build.0 = Release|x64 + {317F35A1-3733-4F67-9BF3-C1C567B0D85E}.Release|x64.ActiveCfg = Release|x64 + {317F35A1-3733-4F67-9BF3-C1C567B0D85E}.Release|x64.Build.0 = Release|x64 + {B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5}.Debug|Any CPU.ActiveCfg = Debug|x64 + {B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5}.Debug|x64.ActiveCfg = Debug|x64 + {B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5}.Debug|x64.Build.0 = Debug|x64 + {B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5}.Release|Any CPU.ActiveCfg = Release|x64 + {B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5}.Release|Mixed Platforms.Build.0 = Release|x64 + {B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5}.Release|x64.ActiveCfg = Release|x64 + {B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5}.Release|x64.Build.0 = Release|x64 + {99D58DA0-7FB7-48A0-9692-AB5141DF3F3C}.Debug|Any CPU.ActiveCfg = Debug|x64 + {99D58DA0-7FB7-48A0-9692-AB5141DF3F3C}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {99D58DA0-7FB7-48A0-9692-AB5141DF3F3C}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {99D58DA0-7FB7-48A0-9692-AB5141DF3F3C}.Debug|x64.ActiveCfg = Debug|x64 + {99D58DA0-7FB7-48A0-9692-AB5141DF3F3C}.Debug|x64.Build.0 = Debug|x64 + {99D58DA0-7FB7-48A0-9692-AB5141DF3F3C}.Release|Any CPU.ActiveCfg = Release|x64 + {99D58DA0-7FB7-48A0-9692-AB5141DF3F3C}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {99D58DA0-7FB7-48A0-9692-AB5141DF3F3C}.Release|Mixed Platforms.Build.0 = Release|x64 + {99D58DA0-7FB7-48A0-9692-AB5141DF3F3C}.Release|x64.ActiveCfg = Release|x64 + {99D58DA0-7FB7-48A0-9692-AB5141DF3F3C}.Release|x64.Build.0 = Release|x64 + {C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4}.Debug|Any CPU.ActiveCfg = Debug|x64 + {C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4}.Debug|x64.ActiveCfg = Debug|x64 + {C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4}.Debug|x64.Build.0 = Debug|x64 + {C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4}.Release|Any CPU.ActiveCfg = Release|x64 + {C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4}.Release|Mixed Platforms.Build.0 = Release|x64 + {C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4}.Release|x64.ActiveCfg = Release|x64 + {C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4}.Release|x64.Build.0 = Release|x64 + {0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F}.Debug|Any CPU.ActiveCfg = Debug|x64 + {0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F}.Debug|x64.ActiveCfg = Debug|x64 + {0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F}.Debug|x64.Build.0 = Debug|x64 + {0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F}.Release|Any CPU.ActiveCfg = Release|x64 + {0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F}.Release|Mixed Platforms.Build.0 = Release|x64 + {0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F}.Release|x64.ActiveCfg = Release|x64 + {0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F}.Release|x64.Build.0 = Release|x64 + {9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5}.Debug|Any CPU.ActiveCfg = Debug|x64 + {9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5}.Debug|x64.ActiveCfg = Debug|x64 + {9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5}.Debug|x64.Build.0 = Debug|x64 + {9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5}.Release|Any CPU.ActiveCfg = Release|x64 + {9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5}.Release|Mixed Platforms.Build.0 = Release|x64 + {9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5}.Release|x64.ActiveCfg = Release|x64 + {9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5}.Release|x64.Build.0 = Release|x64 + {FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A}.Debug|x64.ActiveCfg = Debug|x64 + {FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A}.Debug|x64.Build.0 = Debug|x64 + {FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A}.Release|Any CPU.ActiveCfg = Release|x64 + {FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A}.Release|Mixed Platforms.Build.0 = Release|x64 + {FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A}.Release|x64.ActiveCfg = Release|x64 + {FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A}.Release|x64.Build.0 = Release|x64 + {416E5572-FF88-4F90-A3B0-8ACD94406591}.Debug|Any CPU.ActiveCfg = Debug|x64 + {416E5572-FF88-4F90-A3B0-8ACD94406591}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {416E5572-FF88-4F90-A3B0-8ACD94406591}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {416E5572-FF88-4F90-A3B0-8ACD94406591}.Debug|x64.ActiveCfg = Debug|x64 + {416E5572-FF88-4F90-A3B0-8ACD94406591}.Debug|x64.Build.0 = Debug|x64 + {416E5572-FF88-4F90-A3B0-8ACD94406591}.Release|Any CPU.ActiveCfg = Release|x64 + {416E5572-FF88-4F90-A3B0-8ACD94406591}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {416E5572-FF88-4F90-A3B0-8ACD94406591}.Release|Mixed Platforms.Build.0 = Release|x64 + {416E5572-FF88-4F90-A3B0-8ACD94406591}.Release|x64.ActiveCfg = Release|x64 + {416E5572-FF88-4F90-A3B0-8ACD94406591}.Release|x64.Build.0 = Release|x64 + {8022030D-7B08-4433-BEC3-BAE69D4082E0}.Debug|Any CPU.ActiveCfg = Debug|x64 + {8022030D-7B08-4433-BEC3-BAE69D4082E0}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {8022030D-7B08-4433-BEC3-BAE69D4082E0}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {8022030D-7B08-4433-BEC3-BAE69D4082E0}.Debug|x64.ActiveCfg = Debug|x64 + {8022030D-7B08-4433-BEC3-BAE69D4082E0}.Debug|x64.Build.0 = Debug|x64 + {8022030D-7B08-4433-BEC3-BAE69D4082E0}.Release|Any CPU.ActiveCfg = Release|x64 + {8022030D-7B08-4433-BEC3-BAE69D4082E0}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {8022030D-7B08-4433-BEC3-BAE69D4082E0}.Release|Mixed Platforms.Build.0 = Release|x64 + {8022030D-7B08-4433-BEC3-BAE69D4082E0}.Release|x64.ActiveCfg = Release|x64 + {8022030D-7B08-4433-BEC3-BAE69D4082E0}.Release|x64.Build.0 = Release|x64 + {8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A}.Debug|Any CPU.ActiveCfg = Debug|x64 + {8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A}.Debug|Mixed Platforms.ActiveCfg = Debug|x64 + {8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A}.Debug|Mixed Platforms.Build.0 = Debug|x64 + {8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A}.Debug|x64.ActiveCfg = Debug|x64 + {8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A}.Debug|x64.Build.0 = Debug|x64 + {8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A}.Release|Any CPU.ActiveCfg = Release|x64 + {8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A}.Release|Mixed Platforms.ActiveCfg = Release|x64 + {8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A}.Release|Mixed Platforms.Build.0 = Release|x64 + {8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A}.Release|x64.ActiveCfg = Release|x64 + {8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A}.Release|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -559,6 +754,16 @@ Global {C3F22F91-FE0E-4181-864B-D7EE7225382D} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} {469D4D65-45B3-4641-9C04-480102731EF9} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} {165B27F0-A2BA-4961-B718-0E381B8B92BD} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} + {2CBD872D-5257-46BD-8331-C73E4E8649B0} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} + {8B7F7CB1-2377-45A1-B24F-01B1ECEEB49B} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} + {F24A8F3D-8C25-4283-A95B-8BB9F0722464} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} + {B8C4748A-787E-4ED4-A290-3A9A8C3B8EC2} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} + {8CD7C05F-F440-4AE5-A5D3-195CA918865B} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} + {C2A681ED-16D8-40EE-BDD3-AEF624EA2DDE} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} + {9D7E0A3F-37EE-4950-B5C9-280DEE1FD616} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} + {8F32B13F-C23D-42D5-95F4-88DA41A3DF04} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} + {C299AD86-AD7A-4DD3-80A7-CD6BE9485D9A} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} + {3C6F738C-461F-48A9-9FCF-3AC2126B84CF} = {4528D9E6-C6F8-448E-BD36-5E5DAAFE90D3} {C5825007-742C-4F16-BAB5-09D6EAF2AEF6} = {C3F22F91-FE0E-4181-864B-D7EE7225382D} {1E8B3DDB-15DC-4BB9-BAFB-8252848A8784} = {C3F22F91-FE0E-4181-864B-D7EE7225382D} {A1C4D795-DE5B-4CB0-BFF6-13E1D5A787FD} = {C5825007-742C-4F16-BAB5-09D6EAF2AEF6} @@ -573,11 +778,29 @@ Global {757F1684-39BD-4705-91F1-FE16BD5B1523} = {8C754381-F489-4B5F-885A-415D323D88BF} {F40B2B5B-4C42-4BD8-8CAF-8C96856BAC0F} = {469D4D65-45B3-4641-9C04-480102731EF9} {11835CDF-F5AA-42B9-9FE6-6F94EB9A08B9} = {A8B34174-E462-48BE-975C-604B8B1DB0A0} - {48E311DE-F4D4-4F54-8C2B-FEDA15FE2D40} = {1E30345B-4538-426B-8F15-94C7EDD9F6A1} - {1A50E251-BD04-4049-9745-770CFF672093} = {48E311DE-F4D4-4F54-8C2B-FEDA15FE2D40} {1E30345B-4538-426B-8F15-94C7EDD9F6A1} = {D83DE650-AD2D-4122-9AE2-53AB5364D032} {06633516-0C78-433B-BFFB-A8BCE5006CB7} = {D83DE650-AD2D-4122-9AE2-53AB5364D032} + {48E311DE-F4D4-4F54-8C2B-FEDA15FE2D40} = {1E30345B-4538-426B-8F15-94C7EDD9F6A1} + {1A50E251-BD04-4049-9745-770CFF672093} = {48E311DE-F4D4-4F54-8C2B-FEDA15FE2D40} {E16B0693-80CF-422F-AB4B-B5150FDF5140} = {165B27F0-A2BA-4961-B718-0E381B8B92BD} {5FEB6365-EB6C-4D4D-9DAA-E5E2EEA5A1FF} = {06633516-0C78-433B-BFFB-A8BCE5006CB7} + {A8F91D1C-92D3-4385-9EA0-E646003015B3} = {2CBD872D-5257-46BD-8331-C73E4E8649B0} + {6898B405-0970-4406-BA98-F50CDAB1A849} = {8B7F7CB1-2377-45A1-B24F-01B1ECEEB49B} + {83AEA271-7FBD-4218-91D5-056796194EDC} = {F24A8F3D-8C25-4283-A95B-8BB9F0722464} + {0C6514BE-9895-4361-9C9F-4D2C3E5DCAE7} = {F24A8F3D-8C25-4283-A95B-8BB9F0722464} + {E348F96E-80F3-4D56-AE70-F55FC1EEF88E} = {83AEA271-7FBD-4218-91D5-056796194EDC} + {317F35A1-3733-4F67-9BF3-C1C567B0D85E} = {0C6514BE-9895-4361-9C9F-4D2C3E5DCAE7} + {B4E5FBBF-5CD2-4A9A-8E6C-1BFE877FA8E5} = {B8C4748A-787E-4ED4-A290-3A9A8C3B8EC2} + {733E3760-7FC1-4A1C-B04E-6FAEC969D9E1} = {8CD7C05F-F440-4AE5-A5D3-195CA918865B} + {DF82AF85-2649-4708-A0DF-07E91026422F} = {8CD7C05F-F440-4AE5-A5D3-195CA918865B} + {0014E7B8-2130-4CED-85F1-5E7E246BB6DC} = {8CD7C05F-F440-4AE5-A5D3-195CA918865B} + {99D58DA0-7FB7-48A0-9692-AB5141DF3F3C} = {733E3760-7FC1-4A1C-B04E-6FAEC969D9E1} + {C1A8AD3C-5477-40C6-9BF6-8F8BA21062B4} = {DF82AF85-2649-4708-A0DF-07E91026422F} + {0B1D00CA-F001-43A7-A2B4-98DD6E1B6E6F} = {0014E7B8-2130-4CED-85F1-5E7E246BB6DC} + {9B5FD636-8D61-41C1-B1AE-FE625F1FC0A5} = {C2A681ED-16D8-40EE-BDD3-AEF624EA2DDE} + {FF0AB4EB-D1F0-4D1D-A4EF-DB9EC2C6BD7A} = {9D7E0A3F-37EE-4950-B5C9-280DEE1FD616} + {416E5572-FF88-4F90-A3B0-8ACD94406591} = {8F32B13F-C23D-42D5-95F4-88DA41A3DF04} + {8022030D-7B08-4433-BEC3-BAE69D4082E0} = {C299AD86-AD7A-4DD3-80A7-CD6BE9485D9A} + {8BCAF77A-B79B-4E18-9175-52BB7C1A2A4A} = {3C6F738C-461F-48A9-9FCF-3AC2126B84CF} EndGlobalSection EndGlobal diff --git a/tests/src/JIT/Generics/ConstrainedCall/ConstrainedCall.csproj b/tests/src/JIT/Generics/ConstrainedCall/ConstrainedCall.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/ConstrainedCall.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/ConstrainedCall/app.config b/tests/src/JIT/Generics/ConstrainedCall/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/ConstrainedCall/class1.cs b/tests/src/JIT/Generics/ConstrainedCall/class1.cs new file mode 100644 index 0000000..8b8096a --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/class1.cs @@ -0,0 +1,111 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; +interface IncrDecr +{ + void Incr(int a); + void Decr(int a); + int Val(); +} +class MyInt : IncrDecr +{ + int x; + public void Incr(int a) { x += a; } + public void Decr(int a) { x -= a; } + public int Val() { return x; } +} +class MyCounter where T : IncrDecr, new() +{ + T counter = new T(); + T[] counters = new T[1]; + public void Increment() + { + counter.Incr(100); + } + public void Decrement() + { + counter.Decr(100); + } + public void Increment(int index) + { + counters[index] = new T(); + counters[index].Incr(100); + } + public void Decrement(int index) + { + counters[index].Decr(100); + } + public virtual void Increment2(T cnter) + { + cnter.Incr(100); + counter = cnter; + } + public virtual void Decrement2(T cnter) + { + cnter.Decr(100); + counter = cnter; + } + public int Val() + { + return counter.Val(); + } + public int Val(int index) + { + return counters[index].Val(); + } +} +class test +{ + public static int Main() + { + MyCounter mc = new MyCounter(); + mc.Increment(); + if (mc.Val() != 100) + { + Console.WriteLine("FAILED 1"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val()); + return 1; + } + mc.Decrement(); + if (mc.Val() != 0) + { + Console.WriteLine("FAILED 2"); + Console.WriteLine("Expected: 0, Actual: {0}", mc.Val()); + return 2; + } + mc.Increment(0); + if (mc.Val(0) != 100) + { + Console.WriteLine("FAILED 3"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val(0)); + return 3; + } + mc.Decrement(0); + if (mc.Val(0) != 0) + { + Console.WriteLine("FAILED 4"); + Console.WriteLine("Expected: 0, Actual: {0}", mc.Val(0)); + return 4; + } + MyInt mi = new MyInt(); + mc.Increment2(mi); + if (mc.Val() != 100) + { + Console.WriteLine("FAILED 5"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val()); + return 5; + } + mc.Decrement2(mi); + if (mc.Val() != 0) + { + Console.WriteLine("FAILED 6"); + Console.WriteLine("Expected: 0, Actual: {0}", mc.Val()); + return 6; + } + Console.WriteLine("PASSED"); + return 100; + } +} + diff --git a/tests/src/JIT/Generics/ConstrainedCall/class2.cs b/tests/src/JIT/Generics/ConstrainedCall/class2.cs new file mode 100644 index 0000000..a4e12f2 --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/class2.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; +interface IncrDecr +{ + void Incr(int a); + void Decr(int a); + int Val(); +} +class MyInt : IncrDecr +{ + int x; + public void Incr(int a) { x += a; } + public void Decr(int a) { x -= a; } + public int Val() { return x; } +} +class MyCounter where T : IncrDecr, new() +{ + T counter = new T(); + T[] counters = new T[1]; + public void Increment() where T2 : IncrDecr, new() + { + T2 cnter = new T2(); + cnter.Incr(100); + counter = (T)(IncrDecr)cnter; + } + public void Decrement() where T2 : IncrDecr, new() + { + T2 cnter = (T2)(IncrDecr)counter; + cnter.Decr(100); + counter = (T)(IncrDecr)cnter; + } + public void Increment(int index) where T2 : IncrDecr, new() + { + T2[] cnters = new T2[1]; + cnters[index] = new T2(); + cnters[index].Incr(100); + counters[index] = (T)(IncrDecr)cnters[index]; + } + public void Decrement(int index) where T2 : IncrDecr, new() + { + T2[] cnters = new T2[1]; + cnters[index] = (T2)(IncrDecr)counters[index]; + cnters[index].Decr(100); + counters[index] = (T)(IncrDecr)cnters[index]; ; + } + public virtual void Increment2(T2 cnter) where T2 : IncrDecr, new() + { + cnter.Incr(100); + counter = (T)(IncrDecr)cnter; + } + public virtual void Decrement2(T2 cnter) where T2 : IncrDecr, new() + { + cnter.Decr(100); + counter = (T)(IncrDecr)cnter; + } + public int Val() + { + return counter.Val(); + } + public int Val(int index) + { + return counters[index].Val(); + } +} +class test +{ + public static int Main() + { + MyCounter mc = new MyCounter(); + mc.Increment(); + if (mc.Val() != 100) + { + Console.WriteLine("FAILED 1"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val()); + return 1; + } + mc.Decrement(); + if (mc.Val() != 0) + { + Console.WriteLine("FAILED 2"); + Console.WriteLine("Expected: 0, Actual: {0}", mc.Val()); + return 2; + } + mc.Increment(0); + if (mc.Val(0) != 100) + { + Console.WriteLine("FAILED 3"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val(0)); + return 3; + } + mc.Decrement(0); + if (mc.Val(0) != 0) + { + Console.WriteLine("FAILED 4"); + Console.WriteLine("Expected: 0, Actual: {0}", mc.Val(0)); + return 4; + } + MyInt mi = new MyInt(); + mc.Increment2(mi); + if (mc.Val() != 100) + { + Console.WriteLine("FAILED 5"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val()); + return 5; + } + mc.Decrement2(mi); + if (mc.Val() != 0) + { + Console.WriteLine("FAILED 6"); + Console.WriteLine("Expected: 0, Actual: {0}", mc.Val()); + return 6; + } + Console.WriteLine("PASSED"); + return 100; + } +} + diff --git a/tests/src/JIT/Generics/ConstrainedCall/cs_template.proj b/tests/src/JIT/Generics/ConstrainedCall/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/ConstrainedCall/packages.config b/tests/src/JIT/Generics/ConstrainedCall/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/ConstrainedCall/vt1.cs b/tests/src/JIT/Generics/ConstrainedCall/vt1.cs new file mode 100644 index 0000000..1078c06 --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/vt1.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; +interface IncrDecr +{ + void Incr(int a); + void Decr(int a); + int Val(); +} +struct MyInt : IncrDecr +{ + int x; + public void Incr(int a) { x += a; } + public void Decr(int a) { x -= a; } + public int Val() { return x; } +} +class MyCounter where T : IncrDecr +{ + T counter; + T[] counters = new T[1]; + public void Increment() + { + counter.Incr(100); + } + public void Decrement() + { + counter.Decr(100); + } + public void Increment(int index) + { + counters[index].Incr(100); + } + public void Decrement(int index) + { + counters[index].Decr(100); + } + public virtual void Increment2(T cnter) + { + cnter.Incr(100); + counter = cnter; + } + public virtual void Decrement2(T cnter) + { + cnter.Decr(100); + counter = cnter; + } + public int Val() + { + return counter.Val(); + } + public int Val(int index) + { + return counters[index].Val(); + } +} +class test +{ + public static int Main() + { + MyCounter mc = new MyCounter(); + mc.Increment(); + if (mc.Val() != 100) + { + Console.WriteLine("FAILED 1"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val()); + return 1; + } + mc.Decrement(); + if (mc.Val() != 0) + { + Console.WriteLine("FAILED 2"); + Console.WriteLine("Expected: 0, Actual: {0}", mc.Val()); + return 2; + } + mc.Increment(0); + if (mc.Val(0) != 100) + { + Console.WriteLine("FAILED 3"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val(0)); + return 3; + } + mc.Decrement(0); + if (mc.Val(0) != 0) + { + Console.WriteLine("FAILED 4"); + Console.WriteLine("Expected: 0, Actual: {0}", mc.Val(0)); + return 4; + } + MyInt mi = new MyInt(); + mc.Increment2(mi); + if (mc.Val() != 100) + { + Console.WriteLine("FAILED 5"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val()); + return 5; + } + mc.Decrement2(mi); + if (mc.Val() != -100) + { + Console.WriteLine("FAILED 6"); + Console.WriteLine("Expected: -100, Actual: {0}", mc.Val()); + return 6; + } + Console.WriteLine("PASSED"); + return 100; + } +} + diff --git a/tests/src/JIT/Generics/ConstrainedCall/vt2.cs b/tests/src/JIT/Generics/ConstrainedCall/vt2.cs new file mode 100644 index 0000000..67f8d9d --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/vt2.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; +interface IncrDecr +{ + int Val(); +} +struct MyInt : IncrDecr +{ + int x; + public int Val() { return x; } +} +class MyCounter where T : IncrDecr +{ + T counter; + T[] counters = new T[1]; + public int Val1A() + { + return counter.GetHashCode(); + } + public int Val2A() + { + return counters[0].GetHashCode(); + } + public int Val3A(T cnter) + { + counter = cnter; + return counter.GetHashCode(); + } + public int Val1B() + { + return counter.GetHashCode(); + } + public int Val2B() + { + return counters[0].GetHashCode(); + } + public int Val3B(T cnter) + { + counter = cnter; + return counter.GetHashCode(); + } +} +class test +{ + public static int Main() + { + MyCounter mc = new MyCounter(); + if (mc.Val1A() != mc.Val1B()) + { + Console.WriteLine("FAILED 1"); + Console.WriteLine("mc.Val1A()={0}, mc.Val1B()={0}", mc.Val1A(), mc.Val1B()); + return 1; + } + if (mc.Val2A() != mc.Val2B()) + { + Console.WriteLine("FAILED 2"); + Console.WriteLine("mc.Val1A()={0}, mc.Val1B()={0}", mc.Val2A(), mc.Val2B()); + return 2; + } + MyInt mi = new MyInt(); + if (mc.Val3A(mi) != mc.Val3B(mi)) + { + Console.WriteLine("FAILED 3"); + Console.WriteLine("mc.Val1A()={0}, mc.Val1B()={0}", mc.Val3A(mi), mc.Val3B(mi)); + return 3; + } + Console.WriteLine("PASSED"); + return 100; + } +} + diff --git a/tests/src/JIT/Generics/ConstrainedCall/vt3.cs b/tests/src/JIT/Generics/ConstrainedCall/vt3.cs new file mode 100644 index 0000000..cf40c72 --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/vt3.cs @@ -0,0 +1,75 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; +interface IncrDecr +{ + int Val(); +} +struct MyInt : IncrDecr +{ + int x; + public int Val() { return x + 1; } + public override int GetHashCode() { return Val(); } +} +class MyCounter where T : IncrDecr +{ + T counter; + T[] counters = new T[1]; + public int Val1A() + { + return counter.GetHashCode(); + } + public int Val2A() + { + return counters[0].GetHashCode(); + } + public int Val3A(T cnter) + { + counter = cnter; + return counter.GetHashCode(); + } + public int Val1B() + { + return counter.GetHashCode(); + } + public int Val2B() + { + return counters[0].GetHashCode(); + } + public int Val3B(T cnter) + { + counter = cnter; + return counter.GetHashCode(); + } +} +class test +{ + public static int Main() + { + MyCounter mc = new MyCounter(); + if (mc.Val1A() != mc.Val1B()) + { + Console.WriteLine("FAILED 1"); + Console.WriteLine("mc.Val1A()={0}, mc.Val1B()={0}", mc.Val1A(), mc.Val1B()); + return 1; + } + if (mc.Val2A() != mc.Val2B()) + { + Console.WriteLine("FAILED 2"); + Console.WriteLine("mc.Val1A()={0}, mc.Val1B()={0}", mc.Val2A(), mc.Val2B()); + return 2; + } + MyInt mi = new MyInt(); + if (mc.Val3A(mi) != mc.Val3B(mi)) + { + Console.WriteLine("FAILED 3"); + Console.WriteLine("mc.Val1A()={0}, mc.Val1B()={0}", mc.Val3A(mi), mc.Val3B(mi)); + return 3; + } + Console.WriteLine("PASSED"); + return 100; + } +} + diff --git a/tests/src/JIT/Generics/ConstrainedCall/vt4.cs b/tests/src/JIT/Generics/ConstrainedCall/vt4.cs new file mode 100644 index 0000000..0049065 --- /dev/null +++ b/tests/src/JIT/Generics/ConstrainedCall/vt4.cs @@ -0,0 +1,120 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; +interface IncrDecr +{ + void Incr(int a); + void Decr(int a); + int Val(); +} +struct MyInt : IncrDecr +{ + int x; + public void Incr(int a) { x += a; } + public void Decr(int a) { x -= a; } + public int Val() { return x; } +} +class MyCounter where T : IncrDecr, new() +{ + T counter = new T(); + T[] counters = new T[1]; + public void Increment() where T2 : IncrDecr, new() + { + T2 cnter = new T2(); + cnter.Incr(100); + counter = (T)(IncrDecr)cnter; + } + public void Decrement() where T2 : IncrDecr, new() + { + T2 cnter = (T2)(IncrDecr)counter; + cnter.Decr(100); + counter = (T)(IncrDecr)cnter; + } + public void Increment(int index) where T2 : IncrDecr, new() + { + T2[] cnters = new T2[1]; + cnters[index] = new T2(); + cnters[index].Incr(100); + counters[index] = (T)(IncrDecr)cnters[index]; + } + public void Decrement(int index) where T2 : IncrDecr, new() + { + T2[] cnters = new T2[1]; + cnters[index] = (T2)(IncrDecr)counters[index]; + cnters[index].Decr(100); + counters[index] = (T)(IncrDecr)cnters[index]; ; + } + public virtual void Increment2(T2 cnter) where T2 : IncrDecr, new() + { + cnter.Incr(100); + counter = (T)(IncrDecr)cnter; + } + public virtual void Decrement2(T2 cnter) where T2 : IncrDecr, new() + { + cnter.Decr(100); + counter = (T)(IncrDecr)cnter; + } + public int Val() + { + return counter.Val(); + } + public int Val(int index) + { + return counters[index].Val(); + } +} +class test +{ + public static int Main() + { + MyCounter mc = new MyCounter(); + mc.Increment(); + if (mc.Val() != 100) + { + Console.WriteLine("FAILED 1"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val()); + return 1; + } + mc.Decrement(); + if (mc.Val() != 0) + { + Console.WriteLine("FAILED 2"); + Console.WriteLine("Expected: 0, Actual: {0}", mc.Val()); + return 2; + } + mc.Increment(0); + if (mc.Val(0) != 100) + { + Console.WriteLine("FAILED 3"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val(0)); + return 3; + } + mc.Decrement(0); + if (mc.Val(0) != 0) + { + Console.WriteLine("FAILED 4"); + Console.WriteLine("Expected: 0, Actual: {0}", mc.Val(0)); + return 4; + } + MyInt mi = new MyInt(); + mc.Increment2(mi); + if (mc.Val() != 100) + { + Console.WriteLine("FAILED 5"); + Console.WriteLine("Expected: 100, Actual: {0}", mc.Val()); + return 5; + } + mc.Decrement2(mi); + if (mc.Val() != -100) + { + Console.WriteLine("FAILED 6"); + Console.WriteLine("Expected: -100, Actual: {0}", mc.Val()); + return 6; + } + Console.WriteLine("PASSED"); + return 100; + } +} + diff --git a/tests/src/JIT/Generics/Constraints/Call_instance01.cs b/tests/src/JIT/Generics/Constraints/Call_instance01.cs new file mode 100644 index 0000000..5f04516 --- /dev/null +++ b/tests/src/JIT/Generics/Constraints/Call_instance01.cs @@ -0,0 +1,87 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public interface IFoo +{ + Type InterfaceMethod(); +} + +public class FooClass : IFoo +{ + public Type InterfaceMethod() + { + return this.GetType(); + } +} + +public struct FooStruct : IFoo +{ + public Type InterfaceMethod() + { + return this.GetType(); + } +} + +public class GenClass where T : IFoo +{ + public bool CallOnConstraint(T t) + { + return (t.InterfaceMethod().Equals(typeof(T))); + } + + public virtual bool VirtCallOnConstraint(T t) + { + return (t.InterfaceMethod().Equals(typeof(T))); + } +} + +public struct GenStruct where T : IFoo +{ + public bool CallOnConstraint(T t) + { + return (t.InterfaceMethod().Equals(typeof(T))); + } +} +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new GenClass().CallOnConstraint(new FooClass())); + Eval(new GenClass().CallOnConstraint(new FooStruct())); + + Eval(new GenClass().VirtCallOnConstraint(new FooClass())); + Eval(new GenClass().VirtCallOnConstraint(new FooStruct())); + + Eval(new GenStruct().CallOnConstraint(new FooClass())); + Eval(new GenStruct().CallOnConstraint(new FooStruct())); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} + diff --git a/tests/src/JIT/Generics/Constraints/Call_static01.cs b/tests/src/JIT/Generics/Constraints/Call_static01.cs new file mode 100644 index 0000000..d4c80b9 --- /dev/null +++ b/tests/src/JIT/Generics/Constraints/Call_static01.cs @@ -0,0 +1,78 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public interface IFoo +{ + Type InterfaceMethod(); +} + +public class FooClass : IFoo +{ + public Type InterfaceMethod() + { + return this.GetType(); + } +} + +public struct FooStruct : IFoo +{ + public Type InterfaceMethod() + { + return this.GetType(); + } +} + +public class GenClass where T : IFoo +{ + public static bool CallOnConstraint(T t) + { + return (t.InterfaceMethod().Equals(typeof(T))); + } +} + +public struct GenStruct where T : IFoo +{ + public static bool CallOnConstraint(T t) + { + return (t.InterfaceMethod().Equals(typeof(T))); + } +} +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(GenClass.CallOnConstraint(new FooClass())); + Eval(GenClass.CallOnConstraint(new FooStruct())); + Eval(GenStruct.CallOnConstraint(new FooClass())); + Eval(GenStruct.CallOnConstraint(new FooStruct())); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} + diff --git a/tests/src/JIT/Generics/Constraints/Constraints.csproj b/tests/src/JIT/Generics/Constraints/Constraints.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/Constraints/Constraints.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/Constraints/Convert_instance01.cs b/tests/src/JIT/Generics/Constraints/Convert_instance01.cs new file mode 100644 index 0000000..51c96dd --- /dev/null +++ b/tests/src/JIT/Generics/Constraints/Convert_instance01.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public interface IFoo +{ + +} + +public class FooClass : IFoo +{ + +} + +public struct FooStruct : IFoo +{ + +} + +public class GenClass where T : IFoo +{ + public IFoo ConvertToConstraint(T t) + { + return t; + } + + public virtual IFoo VirtConvertToConstraint(T t) + { + return t; + } +} + +public struct GenStruct where T : IFoo +{ + public IFoo ConvertToConstraint(T t) + { + return t; + } +} +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new GenClass().ConvertToConstraint(new FooClass()).GetType().Equals(typeof(FooClass))); + Eval(new GenClass().ConvertToConstraint(new FooStruct()).GetType().Equals(typeof(FooStruct))); + + Eval(new GenClass().VirtConvertToConstraint(new FooClass()).GetType().Equals(typeof(FooClass))); + Eval(new GenClass().VirtConvertToConstraint(new FooStruct()).GetType().Equals(typeof(FooStruct))); + + Eval(new GenStruct().ConvertToConstraint(new FooClass()).GetType().Equals(typeof(FooClass))); + Eval(new GenStruct().ConvertToConstraint(new FooStruct()).GetType().Equals(typeof(FooStruct))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} + diff --git a/tests/src/JIT/Generics/Constraints/Convert_static01.cs b/tests/src/JIT/Generics/Constraints/Convert_static01.cs new file mode 100644 index 0000000..e67f03c --- /dev/null +++ b/tests/src/JIT/Generics/Constraints/Convert_static01.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public interface IFoo +{ + +} + +public class FooClass : IFoo +{ + +} + +public struct FooStruct : IFoo +{ + +} + +public class GenClass where T : IFoo +{ + public static IFoo ConvertToConstraint(T t) + { + return t; + } +} + +public struct GenStruct where T : IFoo +{ + public static IFoo ConvertToConstraint(T t) + { + return t; + } +} +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(GenClass.ConvertToConstraint(new FooClass()).GetType().Equals(typeof(FooClass))); + Eval(GenClass.ConvertToConstraint(new FooStruct()).GetType().Equals(typeof(FooStruct))); + + Eval(GenStruct.ConvertToConstraint(new FooClass()).GetType().Equals(typeof(FooClass))); + Eval(GenStruct.ConvertToConstraint(new FooStruct()).GetType().Equals(typeof(FooStruct))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} + diff --git a/tests/src/JIT/Generics/Constraints/Transitive_instance01.cs b/tests/src/JIT/Generics/Constraints/Transitive_instance01.cs new file mode 100644 index 0000000..9ff855f --- /dev/null +++ b/tests/src/JIT/Generics/Constraints/Transitive_instance01.cs @@ -0,0 +1,74 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public interface IFoo { } + +public class Transition where T : IFoo { } + +public class FooClass : IFoo { } + +public struct FooStruct : IFoo { } + +public class GenClass where T : IFoo +{ + public Transition TransitiveConstraint() + { + return new Transition(); + } + + public virtual Transition VirtTransitiveConstraint() + { + return new Transition(); + } +} + +public struct GenStruct where T : IFoo +{ + public Transition TransitiveConstraint() + { + return new Transition(); + } +} +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new GenClass().TransitiveConstraint().GetType().Equals(typeof(Transition))); + Eval(new GenClass().TransitiveConstraint().GetType().Equals(typeof(Transition))); + + Eval(new GenClass().VirtTransitiveConstraint().GetType().Equals(typeof(Transition))); + Eval(new GenClass().VirtTransitiveConstraint().GetType().Equals(typeof(Transition))); + + Eval(new GenStruct().TransitiveConstraint().GetType().Equals(typeof(Transition))); + Eval(new GenStruct().TransitiveConstraint().GetType().Equals(typeof(Transition))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} + diff --git a/tests/src/JIT/Generics/Constraints/Transitive_static01.cs b/tests/src/JIT/Generics/Constraints/Transitive_static01.cs new file mode 100644 index 0000000..ba64045 --- /dev/null +++ b/tests/src/JIT/Generics/Constraints/Transitive_static01.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public interface IFoo { } + +public class Transition where T : IFoo { } + +public class FooClass : IFoo { } + +public struct FooStruct : IFoo { } + +public class GenClass where T : IFoo +{ + public static Transition TransitiveConstraint() + { + return new Transition(); + } +} + +public struct GenStruct where T : IFoo +{ + public static Transition TransitiveConstraint() + { + return new Transition(); + } +} +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(GenClass.TransitiveConstraint().GetType().Equals(typeof(Transition))); + Eval(GenClass.TransitiveConstraint().GetType().Equals(typeof(Transition))); + + Eval(GenStruct.TransitiveConstraint().GetType().Equals(typeof(Transition))); + Eval(GenStruct.TransitiveConstraint().GetType().Equals(typeof(Transition))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} + diff --git a/tests/src/JIT/Generics/Constraints/app.config b/tests/src/JIT/Generics/Constraints/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/Constraints/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/Constraints/cs_template.proj b/tests/src/JIT/Generics/Constraints/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/Constraints/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/Constraints/packages.config b/tests/src/JIT/Generics/Constraints/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/Constraints/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/Conversions/Boxing/Boxing.csproj b/tests/src/JIT/Generics/Conversions/Boxing/Boxing.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Boxing/Boxing.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/Conversions/Boxing/app.config b/tests/src/JIT/Generics/Conversions/Boxing/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Boxing/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/Conversions/Boxing/box_unbox01.cs b/tests/src/JIT/Generics/Conversions/Boxing/box_unbox01.cs new file mode 100644 index 0000000..68c9c64 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Boxing/box_unbox01.cs @@ -0,0 +1,73 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public object Box(T t) + { + return (object)t; + } + + public T Unbox(object obj) + { + return (T)obj; + } + +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Gen().Unbox(new Gen().Box(1)).Equals(1)); + Eval(new Gen().Unbox(new Gen().Box(1.111)).Equals(1.111)); + Eval(new Gen().Unbox(new Gen().Box("boxme")).Equals("boxme")); + Eval(new Gen().Unbox(new Gen().Box(new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))).Equals(new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Conversions/Boxing/cs_template.proj b/tests/src/JIT/Generics/Conversions/Boxing/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Boxing/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/Conversions/Boxing/packages.config b/tests/src/JIT/Generics/Conversions/Boxing/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Boxing/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/Conversions/Reference/GenToGen01.cs b/tests/src/JIT/Generics/Conversions/Reference/GenToGen01.cs new file mode 100644 index 0000000..8a5d070 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/GenToGen01.cs @@ -0,0 +1,137 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class GenBase +{ + public virtual Type MyVirtType() + { + return typeof(GenBase); + } + +} + +public class Gen : GenBase +{ + public override Type MyVirtType() + { + return typeof(Gen); + } +} + +public class Converter +{ + public bool ToGenBaseOfT(object src, bool invalid, Type t) + { + try + { + GenBase dst = (GenBase)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenOfT(object src, bool invalid, Type t) + { + try + { + Gen dst = (Gen)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Converter().ToGenOfT(new Gen(), false, typeof(Gen))); + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + Eval(new Converter().ToGenBaseOfT(new GenBase(), false, typeof(GenBase))); + Eval(new Converter().ToGenOfT(new GenBase(), true, null)); + + Eval(new Converter().ToGenOfT(new Gen(), true, null)); + Eval(new Converter().ToGenBaseOfT(new Gen(), true, null)); + Eval(new Converter().ToGenBaseOfT(new GenBase(), true, null)); + Eval(new Converter().ToGenOfT(new GenBase(), true, null)); + + + Eval(new Converter().ToGenOfT(new Gen(), false, typeof(Gen))); + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + Eval(new Converter().ToGenBaseOfT(new GenBase(), false, typeof(GenBase))); + Eval(new Converter().ToGenOfT(new GenBase(), true, null)); + + Eval(new Converter().ToGenOfT(new Gen(), true, null)); + Eval(new Converter().ToGenBaseOfT(new Gen(), true, null)); + Eval(new Converter().ToGenBaseOfT(new GenBase(), true, null)); + Eval(new Converter().ToGenOfT(new GenBase(), true, null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Conversions/Reference/GenToGen02.cs b/tests/src/JIT/Generics/Conversions/Reference/GenToGen02.cs new file mode 100644 index 0000000..0f37737 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/GenToGen02.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface GenBase +{ + Type MyVirtType(); + +} + +public class Gen : GenBase +{ + public virtual Type MyVirtType() + { + return typeof(Gen); + } +} + +public class Converter +{ + public bool ToGenBaseOfT(object src, bool invalid, Type t) + { + try + { + GenBase dst = (GenBase)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenOfT(object src, bool invalid, Type t) + { + try + { + Gen dst = (Gen)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Converter().ToGenOfT(new Gen(), false, typeof(Gen))); + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + + Eval(new Converter().ToGenOfT(new Gen(), true, null)); + Eval(new Converter().ToGenBaseOfT(new Gen(), true, null)); + + Eval(new Converter().ToGenOfT(new Gen(), false, typeof(Gen))); + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + + Eval(new Converter().ToGenOfT(new Gen(), true, null)); + Eval(new Converter().ToGenBaseOfT(new Gen(), true, null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Conversions/Reference/GenToGen03.cs b/tests/src/JIT/Generics/Conversions/Reference/GenToGen03.cs new file mode 100644 index 0000000..faba63c --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/GenToGen03.cs @@ -0,0 +1,125 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface GenBase +{ + Type MyVirtType(); + +} + +public struct Gen : GenBase +{ + public Type MyVirtType() + { + return typeof(Gen); + } +} + +public class Converter +{ + public bool ToGenBaseOfT(object src, bool invalid, Type t) + { + try + { + GenBase dst = (GenBase)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenOfT(object src, bool invalid, Type t) + { + try + { + Gen dst = (Gen)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Converter().ToGenOfT(new Gen(), false, typeof(Gen))); + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + + Eval(new Converter().ToGenOfT(new Gen(), true, null)); + Eval(new Converter().ToGenBaseOfT(new Gen(), true, null)); + + Eval(new Converter().ToGenOfT(new Gen(), false, typeof(Gen))); + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + + Eval(new Converter().ToGenOfT(new Gen(), true, null)); + Eval(new Converter().ToGenBaseOfT(new Gen(), true, null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Conversions/Reference/GenToNonGen01.cs b/tests/src/JIT/Generics/Conversions/Reference/GenToNonGen01.cs new file mode 100644 index 0000000..4354861 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/GenToNonGen01.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class GenBase +{ + public virtual Type MyVirtType() + { + return typeof(GenBase); + } + +} + +public class Gen : GenBase +{ + public override Type MyVirtType() + { + return typeof(Gen); + } +} + +public class Converter +{ + public bool ToGenBaseOfT(object src, bool invalid, Type t) + { + try + { + GenBase dst = (GenBase)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenOfT(object src, bool invalid, Type t) + { + try + { + Gen dst = (Gen)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + Eval(new Converter().ToGenOfT(new GenBase(), true, null)); + + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + Eval(new Converter().ToGenOfT(new GenBase(), true, null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Conversions/Reference/GenToNonGen02.cs b/tests/src/JIT/Generics/Conversions/Reference/GenToNonGen02.cs new file mode 100644 index 0000000..e05b630 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/GenToNonGen02.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface GenBase +{ + Type MyVirtType(); +} + +public class Gen : GenBase +{ + public virtual Type MyVirtType() + { + return typeof(Gen); + } +} + +public class Converter +{ + public bool ToGenBaseOfT(object src, bool invalid, Type t) + { + try + { + GenBase dst = (GenBase)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenOfT(object src, bool invalid, Type t) + { + try + { + Gen dst = (Gen)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Conversions/Reference/GenToNonGen03.cs b/tests/src/JIT/Generics/Conversions/Reference/GenToNonGen03.cs new file mode 100644 index 0000000..deb03c1 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/GenToNonGen03.cs @@ -0,0 +1,116 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface GenBase +{ + Type MyVirtType(); +} + +public struct Gen : GenBase +{ + public Type MyVirtType() + { + return typeof(Gen); + } +} + +public class Converter +{ + public bool ToGenBaseOfT(object src, bool invalid, Type t) + { + try + { + GenBase dst = (GenBase)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenOfT(object src, bool invalid, Type t) + { + try + { + Gen dst = (Gen)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + + Eval(new Converter().ToGenBaseOfT(new Gen(), false, typeof(Gen))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Conversions/Reference/NonGenToGen01.cs b/tests/src/JIT/Generics/Conversions/Reference/NonGenToGen01.cs new file mode 100644 index 0000000..3444027 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/NonGenToGen01.cs @@ -0,0 +1,154 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class GenBase +{ + public virtual Type MyVirtType() + { + return typeof(GenBase); + } + +} + +public class GenInt : GenBase +{ + public override Type MyVirtType() + { + return typeof(GenInt); + } +} + +public class GenString : GenBase +{ + public override Type MyVirtType() + { + return typeof(GenString); + } +} + +public class Converter +{ + public bool ToGenBaseOfT(object src, bool invalid, Type t) + { + try + { + GenBase dst = (GenBase)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenInt(object src, bool invalid, Type t) + { + try + { + GenInt dst = (GenInt)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenString(object src, bool invalid, Type t) + { + try + { + GenString dst = (GenString)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Converter().ToGenBaseOfT(new GenInt(), false, typeof(GenInt))); + Eval(new Converter().ToGenInt(new GenInt(), false, typeof(GenInt))); + Eval(new Converter().ToGenInt(new GenBase(), true, null)); + + Eval(new Converter().ToGenBaseOfT(new GenString(), false, typeof(GenString))); + Eval(new Converter().ToGenString(new GenString(), false, typeof(GenString))); + Eval(new Converter().ToGenString(new GenBase(), true, null)); + + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Conversions/Reference/NonGenToGen02.cs b/tests/src/JIT/Generics/Conversions/Reference/NonGenToGen02.cs new file mode 100644 index 0000000..2f8e1bf --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/NonGenToGen02.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface GenBase +{ + Type MyVirtType(); +} + +public class GenInt : GenBase +{ + public virtual Type MyVirtType() + { + return typeof(GenInt); + } +} + +public class GenString : GenBase +{ + public virtual Type MyVirtType() + { + return typeof(GenString); + } +} + +public class Converter +{ + public bool ToGenBaseOfT(object src, bool invalid, Type t) + { + try + { + GenBase dst = (GenBase)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenInt(object src, bool invalid, Type t) + { + try + { + GenInt dst = (GenInt)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenString(object src, bool invalid, Type t) + { + try + { + GenString dst = (GenString)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Converter().ToGenBaseOfT(new GenInt(), false, typeof(GenInt))); + Eval(new Converter().ToGenBaseOfT(new GenInt(), true, null)); + + Eval(new Converter().ToGenBaseOfT(new GenString(), false, typeof(GenString))); + Eval(new Converter().ToGenBaseOfT(new GenString(), true, null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Conversions/Reference/NonGenToGen03.cs b/tests/src/JIT/Generics/Conversions/Reference/NonGenToGen03.cs new file mode 100644 index 0000000..4264395 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/NonGenToGen03.cs @@ -0,0 +1,147 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface GenBase +{ + Type MyVirtType(); +} + +public struct GenInt : GenBase +{ + public Type MyVirtType() + { + return typeof(GenInt); + } +} + +public struct GenString : GenBase +{ + public Type MyVirtType() + { + return typeof(GenString); + } +} + +public class Converter +{ + public bool ToGenBaseOfT(object src, bool invalid, Type t) + { + try + { + GenBase dst = (GenBase)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenInt(object src, bool invalid, Type t) + { + try + { + GenInt dst = (GenInt)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } + + public bool ToGenString(object src, bool invalid, Type t) + { + try + { + GenString dst = (GenString)src; + if (invalid) + { + return false; + } + return dst.MyVirtType().Equals(t); + } + catch (InvalidCastException) + { + return invalid; + } + catch + { + return false; + } + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Converter().ToGenBaseOfT(new GenInt(), false, typeof(GenInt))); + Eval(new Converter().ToGenBaseOfT(new GenInt(), true, null)); + + Eval(new Converter().ToGenBaseOfT(new GenString(), false, typeof(GenString))); + Eval(new Converter().ToGenBaseOfT(new GenString(), true, null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Conversions/Reference/Reference.csproj b/tests/src/JIT/Generics/Conversions/Reference/Reference.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/Reference.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/Conversions/Reference/app.config b/tests/src/JIT/Generics/Conversions/Reference/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/Conversions/Reference/cs_template.proj b/tests/src/JIT/Generics/Conversions/Reference/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/Conversions/Reference/packages.config b/tests/src/JIT/Generics/Conversions/Reference/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/Conversions/Reference/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/Coverage/Coverage.csproj b/tests/src/JIT/Generics/Coverage/Coverage.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/Coverage/Coverage.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/Coverage/app.config b/tests/src/JIT/Generics/Coverage/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/Coverage/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/Coverage/chaos55915408cs.cs b/tests/src/JIT/Generics/Coverage/chaos55915408cs.cs new file mode 100644 index 0000000..c9b8046 --- /dev/null +++ b/tests/src/JIT/Generics/Coverage/chaos55915408cs.cs @@ -0,0 +1,613 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +/// Generic chaos types +/// CommandLine: +///GenericChaos.exe /mtc:5 /mtcc:1 /mic:10 /ol:Cs /ol:Vb /mtpc:1 /mmtpc:1 +/// +///Data: +///Help: False +/// MaxGenerationDepth: 2 +/// MaxTypeParameterCount: 1 +/// MaxMethodTypeParameterCount: 1 +/// MaxTypeCount: 5 +/// MaxMethodCallDepth: 1000 +/// MaxTypeInheranceCount: 1 +/// MaxStaticFieldCount: 2 +/// MaxInterfaceCount: 10 +/// GenerateInterfaces: True +/// GenerateVirtualMethods: True +/// GenerateMethods: True +/// GenerateGenericMethods: True +/// GenerateNonInlinableMethods: True +/// GenerateStaticMethods: True +/// GenerateInstanceMethods: True +/// GenerateRecursiveMethods: True +/// GenerateStaticFields: True +/// GenerateInstanceFields: True +/// IntermediateTypeRealization: True +/// GenerateConstructorConstraints: True +/// GenerateTypeParameterConstraints: True +/// GenerateMethodParameterConstraints: True +/// OutputPath: chaos +/// OutputLanguages: +/// Cs +/// Vb +/// OutputNamespace: Chaos +/// ShowOutputInConsole: False +/// CompileAndRun: False +/// +namespace Chaos +{ + using System; + + + public class A0A0 : A0, IA1 + { + + private IA1 _fA0A01; + + private static A0A1 _sfA0A00; + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + T t2 = new T(); + A0A0._sfA0A00 = new A0A1(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0NotInlinedStatic() + { + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0A1(); + } + + public static void VerifyA0A0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + T t2 = new T(); + A0A0._sfA0A00 = new A0A1(); + } + + public static void VerifyA0A0Static() + { + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0A1(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + T t3 = new T(); + A0A0._sfA0A00 = new A0A1(); + this._fA0A01 = new A0A0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0NotInlined() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0A1(); + this._fA0A01 = new A0A0(); + } + + public override void VirtualVerifyGeneric() + { + base.VirtualVerifyGeneric(); + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0A1(); + this._fA0A01 = new A0A0(); + } + + public override void VirtualVerify() + { + base.VirtualVerify(); + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0A1(); + this._fA0A01 = new A0A0(); + } + + public void RecurseA0A0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0 next = new A0(); + next.RecurseA0((depth - 1)); + } + + public void CreateAllTypesA0A0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>(); + A0.VerifyA0NotInlinedGenericStatic(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic(); + A0.VerifyA0Static(); + A0 v2 = new A0(); + v2.VerifyA0NotInlinedGeneric(); + A0 v3 = new A0(); + v3.VerifyA0NotInlined(); + A0 v4 = new A0(); + v4.VirtualVerifyGeneric(); + A0 v5 = new A0(); + v5.VirtualVerify(); + A0 v6 = new A0(); + v6.DeepRecursion(); + IA1 i7 = ((IA1)(new A0())); + i7.VerifyInterfaceIA1(); + IA1 i8 = ((IA1)(new A0())); + i8.VerifyInterfaceGenericIA1>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic(); + A0A0.VerifyA0A0Static(); + A0A0 v9 = new A0A0(); + v9.VerifyA0A0NotInlinedGeneric>(); + A0A0 v10 = new A0A0(); + v10.VerifyA0A0NotInlined(); + A0A0 v11 = new A0A0(); + v11.VirtualVerifyGeneric>(); + A0A0 v12 = new A0A0(); + v12.VirtualVerify(); + IA1 i13 = ((IA1)(new A0A0())); + i13.VerifyInterfaceIA1(); + IA1 i14 = ((IA1)(new A0A0())); + i14.VerifyInterfaceGenericIA1(); + A0A1.VerifyA0A1NotInlinedGenericStatic(); + A0A1.VerifyA0A1NotInlinedStatic(); + A0A1.VerifyA0A1GenericStatic(); + A0A1.VerifyA0A1Static(); + A0A1 v15 = new A0A1(); + v15.VerifyA0A1NotInlinedGeneric>(); + A0A1 v16 = new A0A1(); + v16.VerifyA0A1NotInlined(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic>(); + A0A0A0>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>.VerifyA0A0A0GenericStatic>>>(); + A0A0A0>>>.VerifyA0A0A0Static(); + A0A0A0>>>> v17 = new A0A0A0>>>>(); + v17.VerifyA0A0A0NotInlinedGeneric>>>>>(); + A0A0A0>>>>> v18 = new A0A0A0>>>>>(); + v18.VerifyA0A0A0NotInlined(); + } + } + + public class A0A1 : A0 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A1GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A1Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A1(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0 next = new A0A0(); + next.RecurseA0A0((depth - 1)); + } + + public void CreateAllTypesA0A1() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>(); + A0.VerifyA0NotInlinedGenericStatic>>>>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>(); + A0.VerifyA0Static(); + A0 v2 = new A0(); + v2.VerifyA0NotInlinedGeneric(); + A0 v3 = new A0(); + v3.VerifyA0NotInlined(); + A0 v4 = new A0(); + v4.VirtualVerifyGeneric(); + A0 v5 = new A0(); + v5.VirtualVerify(); + A0 v6 = new A0(); + v6.DeepRecursion(); + IA1 i7 = ((IA1)(new A0())); + i7.VerifyInterfaceIA1(); + IA1 i8 = ((IA1)(new A0())); + i8.VerifyInterfaceGenericIA1>>>>>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>>>>>(); + A0A0.VerifyA0A0Static(); + A0A0 v9 = new A0A0(); + v9.VerifyA0A0NotInlinedGeneric(); + A0A0 v10 = new A0A0(); + v10.VerifyA0A0NotInlined(); + A0A0 v11 = new A0A0(); + v11.VirtualVerifyGeneric(); + A0A0 v12 = new A0A0(); + v12.VirtualVerify(); + IA1 i13 = ((IA1)(new A0A0())); + i13.VerifyInterfaceIA1(); + IA1 i14 = ((IA1)(new A0A0())); + i14.VerifyInterfaceGenericIA1>(); + A0A1.VerifyA0A1NotInlinedGenericStatic(); + A0A1>>>>>>.VerifyA0A1NotInlinedStatic(); + A0A1>>>>>>.VerifyA0A1GenericStatic(); + A0A1>>>>>>.VerifyA0A1Static(); + A0A1>>>>>> v15 = new A0A1>>>>>>(); + v15.VerifyA0A1NotInlinedGeneric>>>>>>(); + A0A1>>>>>> v16 = new A0A1>>>>>>(); + v16.VerifyA0A1NotInlined(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic>>>>>>>(); + A0A0A0.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>.VerifyA0A0A0GenericStatic(); + A0A0A0.VerifyA0A0A0Static(); + A0A0A0>>>>>>> v17 = new A0A0A0>>>>>>>(); + v17.VerifyA0A0A0NotInlinedGeneric(); + A0A0A0>>>>>>> v18 = new A0A0A0>>>>>>>(); + v18.VerifyA0A0A0NotInlined(); + } + } + + public class Program + { + + public static int Main(string[] args) + { + A0 v0 = new A0(); + v0.CreateAllTypesA0(); + A0A0 v1 = new A0A0(); + v1.CreateAllTypesA0A0(); + A0A1>>>>>>>>>>>> v2 = new A0A1>>>>>>>>>>>>(); + v2.CreateAllTypesA0A1(); + A0A0A0>>>>>>>>>>>> v3 = new A0A0A0>>>>>>>>>>>>(); + v3.CreateAllTypesA0A0A0(); + System.Console.WriteLine("Test SUCCESS"); + return 100; + } + } + + public interface IA1A2 + where T0 : new() + { + } + + public class A0A0A0 : A0A0 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A0A0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A0A0Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A0A0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A1> next = new A0A1>(); + next.RecurseA0A1((depth - 1)); + } + + public void CreateAllTypesA0A0A0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1(); + A0.VerifyA0NotInlinedGenericStatic(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>>>>>>>(); + A0.VerifyA0Static(); + A0 v2 = new A0(); + v2.VerifyA0NotInlinedGeneric(); + A0 v3 = new A0(); + v3.VerifyA0NotInlined(); + A0 v4 = new A0(); + v4.VirtualVerifyGeneric>>>>>>>(); + A0 v5 = new A0(); + v5.VirtualVerify(); + A0 v6 = new A0(); + v6.DeepRecursion(); + IA1 i7 = ((IA1)(new A0())); + i7.VerifyInterfaceIA1(); + IA1 i8 = ((IA1)(new A0())); + i8.VerifyInterfaceGenericIA1(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>>>>>>(); + A0A0.VerifyA0A0Static(); + A0A0 v9 = new A0A0(); + v9.VerifyA0A0NotInlinedGeneric(); + A0A0 v10 = new A0A0(); + v10.VerifyA0A0NotInlined(); + A0A0 v11 = new A0A0(); + v11.VirtualVerifyGeneric>>(); + A0A0 v12 = new A0A0(); + v12.VirtualVerify(); + IA1 i13 = ((IA1)(new A0A0())); + i13.VerifyInterfaceIA1(); + IA1 i14 = ((IA1)(new A0A0())); + i14.VerifyInterfaceGenericIA1(); + A0A1>>>>>>>.VerifyA0A1NotInlinedGenericStatic>>>>>>>>(); + A0A1>>>>>>>>.VerifyA0A1NotInlinedStatic(); + A0A1.VerifyA0A1GenericStatic>>>>>>>>(); + A0A1.VerifyA0A1Static(); + A0A1>>>>>>>> v15 = new A0A1>>>>>>>>(); + v15.VerifyA0A1NotInlinedGeneric(); + A0A1>>>>>>>> v16 = new A0A1>>>>>>>>(); + v16.VerifyA0A1NotInlined(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic(); + A0A0A0.VerifyA0A0A0NotInlinedStatic(); + A0A0A0.VerifyA0A0A0GenericStatic>(); + A0A0A0>>>>>>>>>.VerifyA0A0A0Static(); + A0A0A0>>>>>>>>>> v17 = new A0A0A0>>>>>>>>>>(); + v17.VerifyA0A0A0NotInlinedGeneric>>>>>>>>>(); + A0A0A0>>>>>>>>>>> v18 = new A0A0A0>>>>>>>>>>>(); + v18.VerifyA0A0A0NotInlined(); + } + } + + public interface IA1 + { + + void VerifyInterfaceIA1(); + + void VerifyInterfaceGenericIA1() + where K : new(); + } + + public class A0 : object, IA1 + { + + public void VerifyInterfaceIA1() + { + System.Console.WriteLine(typeof(A0)); + } + + public void VerifyInterfaceGenericIA1() + where K : new() + { + System.Console.WriteLine(typeof(A0)); + K t1 = new K(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0NotInlinedStatic() + { + System.Console.WriteLine(typeof(A0)); + } + + public static void VerifyA0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + T t2 = new T(); + } + + public static void VerifyA0Static() + { + System.Console.WriteLine(typeof(A0)); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0NotInlined() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0)); + } + + public virtual void VirtualVerifyGeneric() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + } + + public virtual void VirtualVerify() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0)); + } + + public void RecurseA0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A0> next = new A0A0A0>(); + next.RecurseA0A0A0((depth - 1)); + } + + public void DeepRecursion() + { + this.RecurseA0(1000); + System.Console.WriteLine(); + } + + public void CreateAllTypesA0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>(); + A0.VerifyA0NotInlinedGenericStatic>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>(); + A0.VerifyA0Static(); + A0 v2 = new A0(); + v2.VerifyA0NotInlinedGeneric(); + A0 v3 = new A0(); + v3.VerifyA0NotInlined(); + A0 v4 = new A0(); + v4.VirtualVerifyGeneric>>(); + A0 v5 = new A0(); + v5.VirtualVerify(); + A0 v6 = new A0(); + v6.DeepRecursion(); + IA1 i7 = ((IA1)(new A0())); + i7.VerifyInterfaceIA1(); + IA1 i8 = ((IA1)(new A0())); + i8.VerifyInterfaceGenericIA1(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>(); + A0A0.VerifyA0A0Static(); + A0A0 v9 = new A0A0(); + v9.VerifyA0A0NotInlinedGeneric>>(); + A0A0 v10 = new A0A0(); + v10.VerifyA0A0NotInlined(); + A0A0 v11 = new A0A0(); + v11.VirtualVerifyGeneric>>(); + A0A0 v12 = new A0A0(); + v12.VirtualVerify(); + IA1 i13 = ((IA1)(new A0A0())); + i13.VerifyInterfaceIA1(); + IA1 i14 = ((IA1)(new A0A0())); + i14.VerifyInterfaceGenericIA1(); + A0A1.VerifyA0A1NotInlinedGenericStatic>(); + A0A1>.VerifyA0A1NotInlinedStatic(); + A0A1.VerifyA0A1GenericStatic>(); + A0A1>.VerifyA0A1Static(); + A0A1>> v15 = new A0A1>>(); + v15.VerifyA0A1NotInlinedGeneric>>>(); + A0A1 v16 = new A0A1(); + v16.VerifyA0A1NotInlined(); + A0A0A0>>.VerifyA0A0A0NotInlinedGenericStatic>>>(); + A0A0A0.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>.VerifyA0A0A0GenericStatic>>(); + A0A0A0>.VerifyA0A0A0Static(); + A0A0A0 v17 = new A0A0A0(); + v17.VerifyA0A0A0NotInlinedGeneric>(); + A0A0A0 v18 = new A0A0A0(); + v18.VerifyA0A0A0NotInlined(); + } + } +} diff --git a/tests/src/JIT/Generics/Coverage/chaos56200037cs.cs b/tests/src/JIT/Generics/Coverage/chaos56200037cs.cs new file mode 100644 index 0000000..9a430b1 --- /dev/null +++ b/tests/src/JIT/Generics/Coverage/chaos56200037cs.cs @@ -0,0 +1,2822 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +/// Generic chaos types +/// CommandLine: +///GenericChaos.exe /mtc:10 /mtcc:10 /mic:5 /ol:Cs /ol:Vb +/// +///Data: +///Help: False +/// MaxGenerationDepth: 2 +/// MaxTypeParameterCount: 1 +/// MaxMethodTypeParameterCount: 1 +/// MaxTypeCount: 10 +/// MaxMethodCallDepth: 1000 +/// MaxTypeInheranceCount: 10 +/// MaxStaticFieldCount: 2 +/// MaxInterfaceCount: 5 +/// GenerateInterfaces: True +/// GenerateVirtualMethods: True +/// GenerateMethods: True +/// GenerateGenericMethods: True +/// GenerateNonInlinableMethods: True +/// GenerateStaticMethods: True +/// GenerateInstanceMethods: True +/// GenerateRecursiveMethods: True +/// GenerateStaticFields: True +/// GenerateInstanceFields: True +/// IntermediateTypeRealization: True +/// GenerateConstructorConstraints: True +/// GenerateTypeParameterConstraints: True +/// GenerateMethodParameterConstraints: True +/// OutputPath: chaos +/// OutputLanguages: +/// Cs +/// Vb +/// OutputNamespace: Chaos +/// ShowOutputInConsole: False +/// CompileAndRun: False +/// +namespace Chaos +{ + using System; + + + public class A0A1 : A0, IA2 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A1GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A1Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A1(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0 next = new A0A0(); + next.RecurseA0A0((depth - 1)); + } + + public void CreateAllTypesA0A1() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>>>>(); + A0.VerifyA0NotInlinedGenericStatic>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>>>>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>>>>>(); + A0A1.VerifyA0A1NotInlinedGenericStatic>>>(); + A0A1>>.VerifyA0A1NotInlinedStatic(); + A0A1>>>>>.VerifyA0A1GenericStatic(); + A0A1>>.VerifyA0A1Static(); + A0A1 v21 = new A0A1(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1> v22 = new A0A1>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>>>>())); + i24.VerifyInterfaceGenericIA2>(); + A0A0A0>>>>>.VerifyA0A0A0NotInlinedGenericStatic(); + A0A0A0>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>>>>>.VerifyA0A0A0GenericStatic(); + A0A0A0>>>>>>>.VerifyA0A0A0Static(); + A0A0A0>> v25 = new A0A0A0>>(); + v25.VerifyA0A0A0NotInlinedGeneric>>>(); + A0A0A0 v26 = new A0A0A0(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>>())); + i28.VerifyInterfaceGenericIA2>>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>>>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>>>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>>(); + A0A1A2.VerifyA0A1A2NotInlinedGenericStatic>>>(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2.VerifyA0A1A2GenericStatic>>>(); + A0A1A2>.VerifyA0A1A2Static(); + A0A1A2> v37 = new A0A1A2>(); + v37.VerifyA0A1A2NotInlinedGeneric>>>(); + A0A1A2 v38 = new A0A1A2(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>())); + i40.VerifyInterfaceGenericIA2>>>>>>(); + A0A0A0A0>>>>>>.VerifyA0A0A0A0NotInlinedGenericStatic>>>(); + A0A0A0A0>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0.VerifyA0A0A0A0GenericStatic(); + A0A0A0A0.VerifyA0A0A0A0Static(); + A0A0A0A0 v41 = new A0A0A0A0(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>>(); + A0A0A0A0 v42 = new A0A0A0A0(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>>>>>())); + i44.VerifyInterfaceGenericIA2(); + A0A4>>>.VerifyA0A4NotInlinedGenericStatic>>>>(); + A0A4.VerifyA0A4NotInlinedStatic(); + A0A4>>>.VerifyA0A4GenericStatic>(); + A0A4>>>>>>>.VerifyA0A4Static(); + A0A4 v45 = new A0A4(); + v45.VerifyA0A4NotInlinedGeneric(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3>.VerifyA0A0A3NotInlinedGenericStatic>>>(); + A0A0A3.VerifyA0A0A3NotInlinedStatic(); + A0A0A3.VerifyA0A0A3GenericStatic>>>>>>>(); + A0A0A3>>>.VerifyA0A0A3Static(); + A0A0A3 v47 = new A0A0A3(); + v47.VerifyA0A0A3NotInlinedGeneric(); + A0A0A3>>>>>>> v48 = new A0A0A3>>>>>>>(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4.VerifyA0A3A4NotInlinedGenericStatic(); + A0A3A4>>>.VerifyA0A3A4NotInlinedStatic(); + A0A3A4.VerifyA0A3A4GenericStatic>(); + A0A3A4.VerifyA0A3A4Static(); + A0A3A4> v49 = new A0A3A4>(); + v49.VerifyA0A3A4NotInlinedGeneric>(); + A0A3A4>>> v50 = new A0A3A4>>>(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1>>>.VerifyA0A0A1A1NotInlinedGenericStatic(); + A0A0A1A1>>>.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1>>>>>>>>.VerifyA0A0A1A1GenericStatic>>(); + A0A0A1A1.VerifyA0A0A1A1Static(); + A0A0A1A1>>>>>>> v51 = new A0A0A1A1>>>>>>>(); + v51.VerifyA0A0A1A1NotInlinedGeneric>(); + A0A0A1A1>>>>>> v52 = new A0A0A1A1>>>>>>(); + v52.VerifyA0A0A1A1NotInlined(); + } + } + + public class A0 : object, IA1, IA2 + { + + private static A0A0A3 _sfA00; + + private A0A0 _fA01; + + public void VerifyInterfaceIA1() + { + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A0A3(); + this._fA01 = new A0A0(); + } + + public void VerifyInterfaceGenericIA1() + where K : new() + { + System.Console.WriteLine(typeof(A0)); + K t1 = new K(); + A0._sfA00 = new A0A0A3(); + this._fA01 = new A0A0(); + } + + public void VerifyInterfaceIA2() + { + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A0A3(); + this._fA01 = new A0A0(); + } + + public void VerifyInterfaceGenericIA2() + where K : new() + { + System.Console.WriteLine(typeof(A0)); + K t1 = new K(); + A0._sfA00 = new A0A0A3(); + this._fA01 = new A0A0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + T t2 = new T(); + A0._sfA00 = new A0A0A3(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0NotInlinedStatic() + { + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A0A3(); + } + + public static void VerifyA0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + T t2 = new T(); + A0._sfA00 = new A0A0A3(); + } + + public static void VerifyA0Static() + { + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A0A3(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + T t3 = new T(); + A0._sfA00 = new A0A0A3(); + this._fA01 = new A0A0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0NotInlined() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A0A3(); + this._fA01 = new A0A0(); + } + + public virtual void VirtualVerifyGeneric() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A0A3(); + this._fA01 = new A0A0(); + } + + public virtual void VirtualVerify() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A0A3(); + this._fA01 = new A0A0(); + } + + public void RecurseA0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A1A1>> next = new A0A0A1A1>>(); + next.RecurseA0A0A1A1((depth - 1)); + } + + public void DeepRecursion() + { + this.RecurseA0(1000); + System.Console.WriteLine(); + } + + public void CreateAllTypesA0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>(); + A0.VerifyA0NotInlinedGenericStatic>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>>>>(); + A0A1>.VerifyA0A1NotInlinedGenericStatic>>>(); + A0A1.VerifyA0A1NotInlinedStatic(); + A0A1>>>.VerifyA0A1GenericStatic>(); + A0A1>>>.VerifyA0A1Static(); + A0A1 v21 = new A0A1(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>())); + i24.VerifyInterfaceGenericIA2>>>(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic>>(); + A0A0A0.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>.VerifyA0A0A0GenericStatic>>(); + A0A0A0>>.VerifyA0A0A0Static(); + A0A0A0> v25 = new A0A0A0>(); + v25.VerifyA0A0A0NotInlinedGeneric>>>>(); + A0A0A0>>> v26 = new A0A0A0>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>>())); + i28.VerifyInterfaceGenericIA2>>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>(); + A0A1A2.VerifyA0A1A2NotInlinedGenericStatic>(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>.VerifyA0A1A2GenericStatic>>>(); + A0A1A2.VerifyA0A1A2Static(); + A0A1A2> v37 = new A0A1A2>(); + v37.VerifyA0A1A2NotInlinedGeneric(); + A0A1A2> v38 = new A0A1A2>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>())); + i40.VerifyInterfaceGenericIA2>(); + A0A0A0A0>.VerifyA0A0A0A0NotInlinedGenericStatic>>>(); + A0A0A0A0>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0.VerifyA0A0A0A0GenericStatic(); + A0A0A0A0>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0 v41 = new A0A0A0A0(); + v41.VerifyA0A0A0A0NotInlinedGeneric>(); + A0A0A0A0>>> v42 = new A0A0A0A0>>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0())); + i44.VerifyInterfaceGenericIA2(); + A0A4.VerifyA0A4NotInlinedGenericStatic>(); + A0A4>>>.VerifyA0A4NotInlinedStatic(); + A0A4>>>.VerifyA0A4GenericStatic>>>>(); + A0A4>>>.VerifyA0A4Static(); + A0A4>> v45 = new A0A4>>(); + v45.VerifyA0A4NotInlinedGeneric>(); + A0A4>>> v46 = new A0A4>>>(); + v46.VerifyA0A4NotInlined(); + A0A0A3.VerifyA0A0A3NotInlinedGenericStatic>(); + A0A0A3.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>>.VerifyA0A0A3GenericStatic>(); + A0A0A3>>>>.VerifyA0A0A3Static(); + A0A0A3>> v47 = new A0A0A3>>(); + v47.VerifyA0A0A3NotInlinedGeneric>>>(); + A0A0A3 v48 = new A0A0A3(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4>>.VerifyA0A3A4NotInlinedGenericStatic>>>(); + A0A3A4>>>.VerifyA0A3A4NotInlinedStatic(); + A0A3A4>>>.VerifyA0A3A4GenericStatic>>>(); + A0A3A4>>>>.VerifyA0A3A4Static(); + A0A3A4> v49 = new A0A3A4>(); + v49.VerifyA0A3A4NotInlinedGeneric>>>(); + A0A3A4>>>> v50 = new A0A3A4>>>>(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1>>>.VerifyA0A0A1A1NotInlinedGenericStatic(); + A0A0A1A1>>>>.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1>.VerifyA0A0A1A1GenericStatic>>>>(); + A0A0A1A1>>>.VerifyA0A0A1A1Static(); + A0A0A1A1>>> v51 = new A0A0A1A1>>>(); + v51.VerifyA0A0A1A1NotInlinedGeneric(); + A0A0A1A1>>> v52 = new A0A0A1A1>>>(); + v52.VerifyA0A0A1A1NotInlined(); + } + } + + public class A0A3A4 : A0A3 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A3A4NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A3A4NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A3A4GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A3A4Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A3A4NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A3A4NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A3A4(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A3 next = new A0A0A3(); + next.RecurseA0A0A3((depth - 1)); + } + + public void CreateAllTypesA0A3A4() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>>>>>>>>>>(); + A0.VerifyA0NotInlinedGenericStatic>>>>>>>>>>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>>>>>>>>>>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>>>>>>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>>>>>>>>>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>>>>>>>>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2(); + A0A1>>>>>>>>>>>>.VerifyA0A1NotInlinedGenericStatic>>>(); + A0A1>>>.VerifyA0A1NotInlinedStatic(); + A0A1>>>.VerifyA0A1GenericStatic>>>(); + A0A1.VerifyA0A1Static(); + A0A1>>> v21 = new A0A1>>>(); + v21.VerifyA0A1NotInlinedGeneric>>>>>>>>>>>(); + A0A1>> v22 = new A0A1>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>>>>>>>>>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>>>>>>>>>>())); + i24.VerifyInterfaceGenericIA2>(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic>(); + A0A0A0>>>>>>>>>>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>>>>>>>>>>>.VerifyA0A0A0GenericStatic>>>>>>>>>>>(); + A0A0A0.VerifyA0A0A0Static(); + A0A0A0>>> v25 = new A0A0A0>>>(); + v25.VerifyA0A0A0NotInlinedGeneric>>>>>>>>>>>>(); + A0A0A0>>>> v26 = new A0A0A0>>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>>>>>>>>>>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0())); + i28.VerifyInterfaceGenericIA2(); + A0A3.VerifyA0A3NotInlinedGenericStatic(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>>>>>>>>>>>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2(); + A0A1A2.VerifyA0A1A2NotInlinedGenericStatic(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2.VerifyA0A1A2GenericStatic>>>>>>>>>>>(); + A0A1A2.VerifyA0A1A2Static(); + A0A1A2>>>>>>>>>>> v37 = new A0A1A2>>>>>>>>>>>(); + v37.VerifyA0A1A2NotInlinedGeneric>>>(); + A0A1A2>>>>>>>>>>>> v38 = new A0A1A2>>>>>>>>>>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>>>>>>>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2())); + i40.VerifyInterfaceGenericIA2>>>>>>>>>>>>(); + A0A0A0A0>.VerifyA0A0A0A0NotInlinedGenericStatic>>>>>>>>>>>>(); + A0A0A0A0>>>>>>>>>>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>>>>>>>>>>>>.VerifyA0A0A0A0GenericStatic>>>>>>>>>>>(); + A0A0A0A0>.VerifyA0A0A0A0Static(); + A0A0A0A0 v41 = new A0A0A0A0(); + v41.VerifyA0A0A0A0NotInlinedGeneric>(); + A0A0A0A0 v42 = new A0A0A0A0(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0())); + i44.VerifyInterfaceGenericIA2>(); + A0A4.VerifyA0A4NotInlinedGenericStatic(); + A0A4.VerifyA0A4NotInlinedStatic(); + A0A4>.VerifyA0A4GenericStatic>(); + A0A4>.VerifyA0A4Static(); + A0A4> v45 = new A0A4>(); + v45.VerifyA0A4NotInlinedGeneric>(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3>.VerifyA0A0A3NotInlinedGenericStatic>>(); + A0A0A3.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>.VerifyA0A0A3GenericStatic>>>>>>>>>>>>(); + A0A0A3>.VerifyA0A0A3Static(); + A0A0A3>>>>>>>>>>>> v47 = new A0A0A3>>>>>>>>>>>>(); + v47.VerifyA0A0A3NotInlinedGeneric(); + A0A0A3>>>>>>>>>>>>> v48 = new A0A0A3>>>>>>>>>>>>>(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4>>>>>>>>>>>>.VerifyA0A3A4NotInlinedGenericStatic>(); + A0A3A4>.VerifyA0A3A4NotInlinedStatic(); + A0A3A4.VerifyA0A3A4GenericStatic(); + A0A3A4.VerifyA0A3A4Static(); + A0A3A4> v49 = new A0A3A4>(); + v49.VerifyA0A3A4NotInlinedGeneric>(); + A0A3A4 v50 = new A0A3A4(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1>.VerifyA0A0A1A1NotInlinedGenericStatic>>(); + A0A0A1A1.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1>.VerifyA0A0A1A1GenericStatic>(); + A0A0A1A1>.VerifyA0A0A1A1Static(); + A0A0A1A1>>>>>>>>>>>> v51 = new A0A0A1A1>>>>>>>>>>>>(); + v51.VerifyA0A0A1A1NotInlinedGeneric(); + A0A0A1A1> v52 = new A0A0A1A1>(); + v52.VerifyA0A0A1A1NotInlined(); + } + } + + public class A0A0A1 : A0A0, IA2 + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A1NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T t1 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A1NotInlinedStatic() + { + } + + public static void VerifyA0A0A1GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T t1 = new T(); + } + + public static void VerifyA0A0A1Static() + { + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A1NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A1NotInlined() + { + System.Console.WriteLine(this); + } + + public void RecurseA0A0A1(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A3 next = new A0A3(); + next.RecurseA0A3((depth - 1)); + } + + public void CreateAllTypesA0A0A1() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>(); + A0.VerifyA0NotInlinedGenericStatic>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2(); + A0A0.VerifyA0A0NotInlinedGenericStatic>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>(); + A0A1>>.VerifyA0A1NotInlinedGenericStatic>(); + A0A1.VerifyA0A1NotInlinedStatic(); + A0A1.VerifyA0A1GenericStatic>>>(); + A0A1>.VerifyA0A1Static(); + A0A1>> v21 = new A0A1>>(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1())); + i24.VerifyInterfaceGenericIA2>>>(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic(); + A0A0A0>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0.VerifyA0A0A0GenericStatic>(); + A0A0A0.VerifyA0A0A0Static(); + A0A0A0>> v25 = new A0A0A0>>(); + v25.VerifyA0A0A0NotInlinedGeneric>>(); + A0A0A0>>>> v26 = new A0A0A0>>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>())); + i28.VerifyInterfaceGenericIA2>>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>(); + A0A1A2.VerifyA0A1A2NotInlinedGenericStatic(); + A0A1A2.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>.VerifyA0A1A2GenericStatic(); + A0A1A2>>.VerifyA0A1A2Static(); + A0A1A2>>> v37 = new A0A1A2>>>(); + v37.VerifyA0A1A2NotInlinedGeneric>>>>(); + A0A1A2> v38 = new A0A1A2>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>())); + i40.VerifyInterfaceGenericIA2>(); + A0A0A0A0>>.VerifyA0A0A0A0NotInlinedGenericStatic>(); + A0A0A0A0>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0.VerifyA0A0A0A0GenericStatic>(); + A0A0A0A0>>.VerifyA0A0A0A0Static(); + A0A0A0A0>>>> v41 = new A0A0A0A0>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>(); + A0A0A0A0> v42 = new A0A0A0A0>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>())); + i44.VerifyInterfaceGenericIA2>>>>(); + A0A4.VerifyA0A4NotInlinedGenericStatic>>(); + A0A4>>.VerifyA0A4NotInlinedStatic(); + A0A4>>>>.VerifyA0A4GenericStatic>>(); + A0A4.VerifyA0A4Static(); + A0A4>> v45 = new A0A4>>(); + v45.VerifyA0A4NotInlinedGeneric(); + A0A4>> v46 = new A0A4>>(); + v46.VerifyA0A4NotInlined(); + A0A0A3>>.VerifyA0A0A3NotInlinedGenericStatic(); + A0A0A3>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>.VerifyA0A0A3GenericStatic>(); + A0A0A3>>.VerifyA0A0A3Static(); + A0A0A3>> v47 = new A0A0A3>>(); + v47.VerifyA0A0A3NotInlinedGeneric>(); + A0A0A3 v48 = new A0A0A3(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4>>.VerifyA0A3A4NotInlinedGenericStatic>>(); + A0A3A4.VerifyA0A3A4NotInlinedStatic(); + A0A3A4>>.VerifyA0A3A4GenericStatic(); + A0A3A4.VerifyA0A3A4Static(); + A0A3A4> v49 = new A0A3A4>(); + v49.VerifyA0A3A4NotInlinedGeneric>>(); + A0A3A4>> v50 = new A0A3A4>>(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1.VerifyA0A0A1A1NotInlinedGenericStatic>>(); + A0A0A1A1>.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1>>>.VerifyA0A0A1A1GenericStatic>>>(); + A0A0A1A1>>.VerifyA0A0A1A1Static(); + A0A0A1A1>>> v51 = new A0A0A1A1>>>(); + v51.VerifyA0A0A1A1NotInlinedGeneric>>(); + A0A0A1A1>>> v52 = new A0A0A1A1>>>(); + v52.VerifyA0A0A1A1NotInlined(); + } + } + + public class A0A0 : A0, IA1, IA2 + { + + private A0A0A1A1 _fA0A01; + + private static A0 _sfA0A00; + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + T t2 = new T(); + A0A0._sfA0A00 = new A0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0NotInlinedStatic() + { + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0(); + } + + public static void VerifyA0A0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + T t2 = new T(); + A0A0._sfA0A00 = new A0(); + } + + public static void VerifyA0A0Static() + { + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + T t3 = new T(); + A0A0._sfA0A00 = new A0(); + this._fA0A01 = new A0A0A1A1(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0NotInlined() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0(); + this._fA0A01 = new A0A0A1A1(); + } + + public override void VirtualVerifyGeneric() + { + base.VirtualVerifyGeneric(); + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0(); + this._fA0A01 = new A0A0A1A1(); + } + + public override void VirtualVerify() + { + base.VirtualVerify(); + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0(); + this._fA0A01 = new A0A0A1A1(); + } + + public void RecurseA0A0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0 next = new A0(); + next.RecurseA0((depth - 1)); + } + + public void CreateAllTypesA0A0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>>(); + A0.VerifyA0NotInlinedGenericStatic>>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2(); + A0A0.VerifyA0A0NotInlinedGenericStatic(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>>>>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2(); + A0A1.VerifyA0A1NotInlinedGenericStatic>(); + A0A1>>>>>.VerifyA0A1NotInlinedStatic(); + A0A1>.VerifyA0A1GenericStatic>(); + A0A1>.VerifyA0A1Static(); + A0A1>>> v21 = new A0A1>>>(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1> v22 = new A0A1>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>>>>())); + i24.VerifyInterfaceGenericIA2>>>(); + A0A0A0>>>.VerifyA0A0A0NotInlinedGenericStatic>>>(); + A0A0A0>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0.VerifyA0A0A0GenericStatic>>>>>>(); + A0A0A0>>>>.VerifyA0A0A0Static(); + A0A0A0 v25 = new A0A0A0(); + v25.VerifyA0A0A0NotInlinedGeneric>(); + A0A0A0>>> v26 = new A0A0A0>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>>>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0())); + i28.VerifyInterfaceGenericIA2>(); + A0A3.VerifyA0A3NotInlinedGenericStatic(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>>>>>(); + A0A1A2>>>>.VerifyA0A1A2NotInlinedGenericStatic>>>>>(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>.VerifyA0A1A2GenericStatic>(); + A0A1A2>>.VerifyA0A1A2Static(); + A0A1A2>>>> v37 = new A0A1A2>>>>(); + v37.VerifyA0A1A2NotInlinedGeneric>>>>(); + A0A1A2>>>> v38 = new A0A1A2>>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>())); + i40.VerifyInterfaceGenericIA2>(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedGenericStatic>>>>>>(); + A0A0A0A0>>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>.VerifyA0A0A0A0GenericStatic>>(); + A0A0A0A0>>>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0> v41 = new A0A0A0A0>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>>>>>(); + A0A0A0A0> v42 = new A0A0A0A0>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>>>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>>>())); + i44.VerifyInterfaceGenericIA2(); + A0A4.VerifyA0A4NotInlinedGenericStatic>(); + A0A4>.VerifyA0A4NotInlinedStatic(); + A0A4>.VerifyA0A4GenericStatic>(); + A0A4.VerifyA0A4Static(); + A0A4>>>>> v45 = new A0A4>>>>>(); + v45.VerifyA0A4NotInlinedGeneric>>(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3>>>>>.VerifyA0A0A3NotInlinedGenericStatic>>>>>(); + A0A0A3>>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>>>>>.VerifyA0A0A3GenericStatic>>>>(); + A0A0A3.VerifyA0A0A3Static(); + A0A0A3> v47 = new A0A0A3>(); + v47.VerifyA0A0A3NotInlinedGeneric>(); + A0A0A3 v48 = new A0A0A3(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4>.VerifyA0A3A4NotInlinedGenericStatic>(); + A0A3A4>.VerifyA0A3A4NotInlinedStatic(); + A0A3A4>.VerifyA0A3A4GenericStatic>>>>>>(); + A0A3A4>>>>>>.VerifyA0A3A4Static(); + A0A3A4>> v49 = new A0A3A4>>(); + v49.VerifyA0A3A4NotInlinedGeneric(); + A0A3A4>> v50 = new A0A3A4>>(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1>.VerifyA0A0A1A1NotInlinedGenericStatic>>>(); + A0A0A1A1.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1>.VerifyA0A0A1A1GenericStatic(); + A0A0A1A1>>>>>.VerifyA0A0A1A1Static(); + A0A0A1A1>>> v51 = new A0A0A1A1>>>(); + v51.VerifyA0A0A1A1NotInlinedGeneric(); + A0A0A1A1 v52 = new A0A0A1A1(); + v52.VerifyA0A0A1A1NotInlined(); + } + } + + public interface IA2 + { + + void VerifyInterfaceIA2(); + + void VerifyInterfaceGenericIA2() + where K : new(); + } + + public class A0A1A2 : A0A1, IA2 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1A2NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1A2NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A1A2GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A1A2Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1A2NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1A2NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A1A2(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A1 next = new A0A0A1(); + next.RecurseA0A0A1((depth - 1)); + } + + public void CreateAllTypesA0A1A2() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>>(); + A0.VerifyA0NotInlinedGenericStatic>>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>>>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>>>(); + A0A1>>.VerifyA0A1NotInlinedGenericStatic(); + A0A1>>>.VerifyA0A1NotInlinedStatic(); + A0A1>>>.VerifyA0A1GenericStatic(); + A0A1.VerifyA0A1Static(); + A0A1> v21 = new A0A1>(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1>>>> v22 = new A0A1>>>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1())); + i24.VerifyInterfaceGenericIA2>>(); + A0A0A0>>>.VerifyA0A0A0NotInlinedGenericStatic(); + A0A0A0>>>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>.VerifyA0A0A0GenericStatic(); + A0A0A0>>>.VerifyA0A0A0Static(); + A0A0A0 v25 = new A0A0A0(); + v25.VerifyA0A0A0NotInlinedGeneric>(); + A0A0A0 v26 = new A0A0A0(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0())); + i28.VerifyInterfaceGenericIA2>>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>(); + A0A1A2>>>>.VerifyA0A1A2NotInlinedGenericStatic(); + A0A1A2.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>.VerifyA0A1A2GenericStatic>>>>(); + A0A1A2>>>>.VerifyA0A1A2Static(); + A0A1A2> v37 = new A0A1A2>(); + v37.VerifyA0A1A2NotInlinedGeneric(); + A0A1A2> v38 = new A0A1A2>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>>())); + i40.VerifyInterfaceGenericIA2>>>(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedGenericStatic(); + A0A0A0A0>>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>.VerifyA0A0A0A0GenericStatic>>>(); + A0A0A0A0>>.VerifyA0A0A0A0Static(); + A0A0A0A0>>>> v41 = new A0A0A0A0>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>>>>(); + A0A0A0A0> v42 = new A0A0A0A0>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>())); + i44.VerifyInterfaceGenericIA2(); + A0A4>>>.VerifyA0A4NotInlinedGenericStatic>(); + A0A4>.VerifyA0A4NotInlinedStatic(); + A0A4>>.VerifyA0A4GenericStatic>>>>(); + A0A4.VerifyA0A4Static(); + A0A4 v45 = new A0A4(); + v45.VerifyA0A4NotInlinedGeneric(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3.VerifyA0A0A3NotInlinedGenericStatic>>>>(); + A0A0A3.VerifyA0A0A3NotInlinedStatic(); + A0A0A3.VerifyA0A0A3GenericStatic(); + A0A0A3>>.VerifyA0A0A3Static(); + A0A0A3 v47 = new A0A0A3(); + v47.VerifyA0A0A3NotInlinedGeneric>>(); + A0A0A3>>>> v48 = new A0A0A3>>>>(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4.VerifyA0A3A4NotInlinedGenericStatic>>(); + A0A3A4>>>>.VerifyA0A3A4NotInlinedStatic(); + A0A3A4>.VerifyA0A3A4GenericStatic>>(); + A0A3A4>>.VerifyA0A3A4Static(); + A0A3A4>>>>> v49 = new A0A3A4>>>>>(); + v49.VerifyA0A3A4NotInlinedGeneric>(); + A0A3A4> v50 = new A0A3A4>(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1>.VerifyA0A0A1A1NotInlinedGenericStatic>(); + A0A0A1A1>.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1>>>>.VerifyA0A0A1A1GenericStatic>(); + A0A0A1A1>>.VerifyA0A0A1A1Static(); + A0A0A1A1 v51 = new A0A0A1A1(); + v51.VerifyA0A0A1A1NotInlinedGeneric>>(); + A0A0A1A1>>>>> v52 = new A0A0A1A1>>>>>(); + v52.VerifyA0A0A1A1NotInlined(); + } + } + + public interface IA1 : IA2 + { + + void VerifyInterfaceIA1(); + + void VerifyInterfaceGenericIA1() + where K : new(); + } + + public interface IA1A2 : IA2 + where T0 : new() + { + } + + public class Program + { + + public static int Main(string[] args) + { + A0 v0 = new A0(); + v0.CreateAllTypesA0(); + A0A0 v1 = new A0A0(); + v1.CreateAllTypesA0A0(); + A0A1>> v2 = new A0A1>>(); + v2.CreateAllTypesA0A1(); + A0A0A0> v3 = new A0A0A0>(); + v3.CreateAllTypesA0A0A0(); + A0A3 v4 = new A0A3(); + v4.CreateAllTypesA0A3(); + A0A0A1 v5 = new A0A0A1(); + v5.CreateAllTypesA0A0A1(); + A0A1A2>>>>>>>>>>>>>>> v6 = new A0A1A2>>>>>>>>>>>>>>>(); + v6.CreateAllTypesA0A1A2(); + A0A0A0A0 v7 = new A0A0A0A0(); + v7.CreateAllTypesA0A0A0A0(); + A0A4 v8 = new A0A4(); + v8.CreateAllTypesA0A4(); + A0A0A3> v9 = new A0A0A3>(); + v9.CreateAllTypesA0A0A3(); + A0A3A4 v10 = new A0A3A4(); + v10.CreateAllTypesA0A3A4(); + A0A0A1A1>> v11 = new A0A0A1A1>>(); + v11.CreateAllTypesA0A0A1A1(); + System.Console.WriteLine("Test SUCCESS"); + return 100; + } + } + + public interface IA2A6 + where T0 : new() + { + } + + public interface IA1A5 : IA2 + where T0 : new() + { + } + + public class A0A4 : A0 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A4NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A4NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A4GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A4Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A4NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A4NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A4(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A0A0 next = new A0A0A0A0(); + next.RecurseA0A0A0A0((depth - 1)); + } + + public void CreateAllTypesA0A4() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2(); + A0.VerifyA0NotInlinedGenericStatic>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>>>>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2(); + A0A0.VerifyA0A0NotInlinedGenericStatic(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>>>>>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>>>>>>>(); + A0A1>>>>>>.VerifyA0A1NotInlinedGenericStatic(); + A0A1>>>>>>>.VerifyA0A1NotInlinedStatic(); + A0A1>>.VerifyA0A1GenericStatic(); + A0A1.VerifyA0A1Static(); + A0A1>>>>>>> v21 = new A0A1>>>>>>>(); + v21.VerifyA0A1NotInlinedGeneric>>>(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>())); + i24.VerifyInterfaceGenericIA2(); + A0A0A0>>.VerifyA0A0A0NotInlinedGenericStatic(); + A0A0A0.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>.VerifyA0A0A0GenericStatic>>(); + A0A0A0>.VerifyA0A0A0Static(); + A0A0A0> v25 = new A0A0A0>(); + v25.VerifyA0A0A0NotInlinedGeneric>(); + A0A0A0 v26 = new A0A0A0(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>>>>>>>())); + i28.VerifyInterfaceGenericIA2(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>>(); + A0A1A2.VerifyA0A1A2NotInlinedGenericStatic>>(); + A0A1A2.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>.VerifyA0A1A2GenericStatic(); + A0A1A2.VerifyA0A1A2Static(); + A0A1A2>>> v37 = new A0A1A2>>>(); + v37.VerifyA0A1A2NotInlinedGeneric(); + A0A1A2 v38 = new A0A1A2(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2())); + i40.VerifyInterfaceGenericIA2>>>>>>>(); + A0A0A0A0>>>>>>>.VerifyA0A0A0A0NotInlinedGenericStatic(); + A0A0A0A0>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>>.VerifyA0A0A0A0GenericStatic>(); + A0A0A0A0.VerifyA0A0A0A0Static(); + A0A0A0A0>>>>>>>> v41 = new A0A0A0A0>>>>>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric(); + A0A0A0A0>>>>>>>>> v42 = new A0A0A0A0>>>>>>>>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0())); + i44.VerifyInterfaceGenericIA2(); + A0A4.VerifyA0A4NotInlinedGenericStatic>>>(); + A0A4>>>>>>>>.VerifyA0A4NotInlinedStatic(); + A0A4>.VerifyA0A4GenericStatic>>(); + A0A4.VerifyA0A4Static(); + A0A4 v45 = new A0A4(); + v45.VerifyA0A4NotInlinedGeneric>>>>>>>>(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3>.VerifyA0A0A3NotInlinedGenericStatic(); + A0A0A3>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>>.VerifyA0A0A3GenericStatic>(); + A0A0A3.VerifyA0A0A3Static(); + A0A0A3>>>>>>>> v47 = new A0A0A3>>>>>>>>(); + v47.VerifyA0A0A3NotInlinedGeneric>>>>>>>>>(); + A0A0A3>>>>>>>>> v48 = new A0A0A3>>>>>>>>>(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4>.VerifyA0A3A4NotInlinedGenericStatic>(); + A0A3A4>>>.VerifyA0A3A4NotInlinedStatic(); + A0A3A4>>>.VerifyA0A3A4GenericStatic>(); + A0A3A4.VerifyA0A3A4Static(); + A0A3A4> v49 = new A0A3A4>(); + v49.VerifyA0A3A4NotInlinedGeneric(); + A0A3A4> v50 = new A0A3A4>(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1.VerifyA0A0A1A1NotInlinedGenericStatic>>>>>>>>>>(); + A0A0A1A1>.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1.VerifyA0A0A1A1GenericStatic>(); + A0A0A1A1>.VerifyA0A0A1A1Static(); + A0A0A1A1>> v51 = new A0A0A1A1>>(); + v51.VerifyA0A0A1A1NotInlinedGeneric(); + A0A0A1A1>>> v52 = new A0A0A1A1>>>(); + v52.VerifyA0A0A1A1NotInlined(); + } + } + + public class A0A0A0A0 : A0A0A0, IA2 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0A0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0A0NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A0A0A0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A0A0A0Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0A0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0A0NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A0A0A0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A1A2 next = new A0A1A2(); + next.RecurseA0A1A2((depth - 1)); + } + + public void CreateAllTypesA0A0A0A0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>>>(); + A0.VerifyA0NotInlinedGenericStatic>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>>>>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2(); + A0A1>>>>>>.VerifyA0A1NotInlinedGenericStatic>>>>>(); + A0A1>.VerifyA0A1NotInlinedStatic(); + A0A1.VerifyA0A1GenericStatic(); + A0A1>.VerifyA0A1Static(); + A0A1>> v21 = new A0A1>>(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1>>>>>> v22 = new A0A1>>>>>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>>>>())); + i24.VerifyInterfaceGenericIA2(); + A0A0A0>>.VerifyA0A0A0NotInlinedGenericStatic>>>(); + A0A0A0>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>>.VerifyA0A0A0GenericStatic>(); + A0A0A0>>>>.VerifyA0A0A0Static(); + A0A0A0>>>>> v25 = new A0A0A0>>>>>(); + v25.VerifyA0A0A0NotInlinedGeneric>>>>>(); + A0A0A0>> v26 = new A0A0A0>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0())); + i28.VerifyInterfaceGenericIA2(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>>>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2(); + A0A1A2>.VerifyA0A1A2NotInlinedGenericStatic>>>>>>(); + A0A1A2>>>>>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>.VerifyA0A1A2GenericStatic>>(); + A0A1A2.VerifyA0A1A2Static(); + A0A1A2 v37 = new A0A1A2(); + v37.VerifyA0A1A2NotInlinedGeneric(); + A0A1A2>>>>>> v38 = new A0A1A2>>>>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>())); + i40.VerifyInterfaceGenericIA2>>(); + A0A0A0A0>>.VerifyA0A0A0A0NotInlinedGenericStatic>>>>>>(); + A0A0A0A0>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>>>>>.VerifyA0A0A0A0GenericStatic>(); + A0A0A0A0>>>>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0>> v41 = new A0A0A0A0>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>(); + A0A0A0A0 v42 = new A0A0A0A0(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>>>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>>>>>())); + i44.VerifyInterfaceGenericIA2>>(); + A0A4>>>>>>>.VerifyA0A4NotInlinedGenericStatic>>>>>>(); + A0A4>>.VerifyA0A4NotInlinedStatic(); + A0A4>>.VerifyA0A4GenericStatic>>>(); + A0A4>>>>>>.VerifyA0A4Static(); + A0A4>>>>>>> v45 = new A0A4>>>>>>>(); + v45.VerifyA0A4NotInlinedGeneric>>>>>(); + A0A4> v46 = new A0A4>(); + v46.VerifyA0A4NotInlined(); + A0A0A3.VerifyA0A0A3NotInlinedGenericStatic>(); + A0A0A3>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3.VerifyA0A0A3GenericStatic>>(); + A0A0A3.VerifyA0A0A3Static(); + A0A0A3> v47 = new A0A0A3>(); + v47.VerifyA0A0A3NotInlinedGeneric>>(); + A0A0A3 v48 = new A0A0A3(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4>>>>>>>.VerifyA0A3A4NotInlinedGenericStatic>>(); + A0A3A4>>.VerifyA0A3A4NotInlinedStatic(); + A0A3A4>>>>>>>.VerifyA0A3A4GenericStatic>>>>>>>(); + A0A3A4>>>>>>>.VerifyA0A3A4Static(); + A0A3A4>>>>>> v49 = new A0A3A4>>>>>>(); + v49.VerifyA0A3A4NotInlinedGeneric>>(); + A0A3A4 v50 = new A0A3A4(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1>>>>>>.VerifyA0A0A1A1NotInlinedGenericStatic>(); + A0A0A1A1>.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1>>.VerifyA0A0A1A1GenericStatic(); + A0A0A1A1>>>.VerifyA0A0A1A1Static(); + A0A0A1A1> v51 = new A0A0A1A1>(); + v51.VerifyA0A0A1A1NotInlinedGeneric(); + A0A0A1A1>> v52 = new A0A0A1A1>>(); + v52.VerifyA0A0A1A1NotInlined(); + } + } + + public class A0A0A1A1 : A0A0A1 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A1A1NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A1A1NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A0A1A1GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A0A1A1Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A1A1NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A1A1NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A0A1A1(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A3A4> next = new A0A3A4>(); + next.RecurseA0A3A4((depth - 1)); + } + + public void CreateAllTypesA0A0A1A1() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2(); + A0.VerifyA0NotInlinedGenericStatic(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>>>>>>>>>>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>>>>>>>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>>>>>>>>>>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>(); + A0A1.VerifyA0A1NotInlinedGenericStatic>(); + A0A1>.VerifyA0A1NotInlinedStatic(); + A0A1.VerifyA0A1GenericStatic>>(); + A0A1.VerifyA0A1Static(); + A0A1>> v21 = new A0A1>>(); + v21.VerifyA0A1NotInlinedGeneric>(); + A0A1>> v22 = new A0A1>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>())); + i24.VerifyInterfaceGenericIA2>(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic(); + A0A0A0.VerifyA0A0A0NotInlinedStatic(); + A0A0A0.VerifyA0A0A0GenericStatic(); + A0A0A0>.VerifyA0A0A0Static(); + A0A0A0>> v25 = new A0A0A0>>(); + v25.VerifyA0A0A0NotInlinedGeneric>>(); + A0A0A0>>>>>>>>>>>>>> v26 = new A0A0A0>>>>>>>>>>>>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>())); + i28.VerifyInterfaceGenericIA2(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>(); + A0A1A2>.VerifyA0A1A2NotInlinedGenericStatic(); + A0A1A2>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>.VerifyA0A1A2GenericStatic>(); + A0A1A2.VerifyA0A1A2Static(); + A0A1A2>> v37 = new A0A1A2>>(); + v37.VerifyA0A1A2NotInlinedGeneric>(); + A0A1A2>>> v38 = new A0A1A2>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>>>>>>>>>>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2())); + i40.VerifyInterfaceGenericIA2>(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedGenericStatic>(); + A0A0A0A0>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>.VerifyA0A0A0A0GenericStatic>(); + A0A0A0A0>.VerifyA0A0A0A0Static(); + A0A0A0A0 v41 = new A0A0A0A0(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>(); + A0A0A0A0>> v42 = new A0A0A0A0>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0())); + i44.VerifyInterfaceGenericIA2>>(); + A0A4.VerifyA0A4NotInlinedGenericStatic(); + A0A4>>.VerifyA0A4NotInlinedStatic(); + A0A4>>>.VerifyA0A4GenericStatic>>(); + A0A4.VerifyA0A4Static(); + A0A4 v45 = new A0A4(); + v45.VerifyA0A4NotInlinedGeneric>(); + A0A4>>>>>>>>>>>>>> v46 = new A0A4>>>>>>>>>>>>>>(); + v46.VerifyA0A4NotInlined(); + A0A0A3.VerifyA0A0A3NotInlinedGenericStatic>>(); + A0A0A3>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3.VerifyA0A0A3GenericStatic(); + A0A0A3>.VerifyA0A0A3Static(); + A0A0A3 v47 = new A0A0A3(); + v47.VerifyA0A0A3NotInlinedGeneric(); + A0A0A3 v48 = new A0A0A3(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4.VerifyA0A3A4NotInlinedGenericStatic>>(); + A0A3A4>.VerifyA0A3A4NotInlinedStatic(); + A0A3A4>>>>>>>>>>>>>>>.VerifyA0A3A4GenericStatic>(); + A0A3A4>.VerifyA0A3A4Static(); + A0A3A4> v49 = new A0A3A4>(); + v49.VerifyA0A3A4NotInlinedGeneric>(); + A0A3A4>> v50 = new A0A3A4>>(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1>.VerifyA0A0A1A1NotInlinedGenericStatic>>(); + A0A0A1A1>>.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1.VerifyA0A0A1A1GenericStatic>(); + A0A0A1A1>.VerifyA0A0A1A1Static(); + A0A0A1A1>>>>>>>>>>>>>>> v51 = new A0A0A1A1>>>>>>>>>>>>>>>(); + v51.VerifyA0A0A1A1NotInlinedGeneric>>>(); + A0A0A1A1>> v52 = new A0A0A1A1>>(); + v52.VerifyA0A0A1A1NotInlined(); + } + } + + public class A0A0A0 : A0A0, IA2 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A0A0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A0A0Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A0A0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A1> next = new A0A1>(); + next.RecurseA0A1((depth - 1)); + } + + public void CreateAllTypesA0A0A0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>>>>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>>>(); + A0.VerifyA0NotInlinedGenericStatic(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>>>>>>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>>>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2(); + A0A0.VerifyA0A0NotInlinedGenericStatic(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>>>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>>>>>>>(); + A0A1>>>>>>>>.VerifyA0A1NotInlinedGenericStatic(); + A0A1.VerifyA0A1NotInlinedStatic(); + A0A1.VerifyA0A1GenericStatic(); + A0A1>>>>>>>.VerifyA0A1Static(); + A0A1>>>>>>> v21 = new A0A1>>>>>>>(); + v21.VerifyA0A1NotInlinedGeneric>>>>>>>(); + A0A1>>>>>>>> v22 = new A0A1>>>>>>>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>>())); + i24.VerifyInterfaceGenericIA2(); + A0A0A0>.VerifyA0A0A0NotInlinedGenericStatic>>>>(); + A0A0A0>>>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>>>>.VerifyA0A0A0GenericStatic>>>>>>(); + A0A0A0.VerifyA0A0A0Static(); + A0A0A0>>>> v25 = new A0A0A0>>>>(); + v25.VerifyA0A0A0NotInlinedGeneric(); + A0A0A0 v26 = new A0A0A0(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>>>>>>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>>())); + i28.VerifyInterfaceGenericIA2>>>>>>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>>>(); + A0A1A2>>>.VerifyA0A1A2NotInlinedGenericStatic(); + A0A1A2>>>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2.VerifyA0A1A2GenericStatic(); + A0A1A2.VerifyA0A1A2Static(); + A0A1A2> v37 = new A0A1A2>(); + v37.VerifyA0A1A2NotInlinedGeneric>>>>>>>>(); + A0A1A2>>>> v38 = new A0A1A2>>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>>>>>>())); + i40.VerifyInterfaceGenericIA2>>>>>>>(); + A0A0A0A0>>>>>>>>.VerifyA0A0A0A0NotInlinedGenericStatic>>>>>>>>(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>>>.VerifyA0A0A0A0GenericStatic>>>>>>>>(); + A0A0A0A0>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0>>>> v41 = new A0A0A0A0>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric(); + A0A0A0A0>>>>>>>> v42 = new A0A0A0A0>>>>>>>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>>>>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0())); + i44.VerifyInterfaceGenericIA2>>>>(); + A0A4>>>>.VerifyA0A4NotInlinedGenericStatic>>>>>>>>(); + A0A4>>>>>>>>.VerifyA0A4NotInlinedStatic(); + A0A4>>>>>>>>.VerifyA0A4GenericStatic>(); + A0A4>>>>>>>>>.VerifyA0A4Static(); + A0A4>>>>>>>> v45 = new A0A4>>>>>>>>(); + v45.VerifyA0A4NotInlinedGeneric>>>>>>>>>(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3.VerifyA0A0A3NotInlinedGenericStatic>(); + A0A0A3>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3.VerifyA0A0A3GenericStatic(); + A0A0A3>>>>.VerifyA0A0A3Static(); + A0A0A3>>> v47 = new A0A0A3>>>(); + v47.VerifyA0A0A3NotInlinedGeneric>>>>>>>(); + A0A0A3 v48 = new A0A0A3(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4>>>>.VerifyA0A3A4NotInlinedGenericStatic>>>>(); + A0A3A4>>>>>>>.VerifyA0A3A4NotInlinedStatic(); + A0A3A4>.VerifyA0A3A4GenericStatic(); + A0A3A4>>>>>>>>.VerifyA0A3A4Static(); + A0A3A4 v49 = new A0A3A4(); + v49.VerifyA0A3A4NotInlinedGeneric(); + A0A3A4> v50 = new A0A3A4>(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1>.VerifyA0A0A1A1NotInlinedGenericStatic>(); + A0A0A1A1>>>>.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1>>>.VerifyA0A0A1A1GenericStatic>>>(); + A0A0A1A1>>.VerifyA0A0A1A1Static(); + A0A0A1A1>>> v51 = new A0A0A1A1>>>(); + v51.VerifyA0A0A1A1NotInlinedGeneric>>>>>>>>(); + A0A0A1A1>>>> v52 = new A0A0A1A1>>>>(); + v52.VerifyA0A0A1A1NotInlined(); + } + } + + public class A0A3 : A0, IA2 + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A3NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T t1 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A3NotInlinedStatic() + { + } + + public static void VerifyA0A3GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T t1 = new T(); + } + + public static void VerifyA0A3Static() + { + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A3NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A3NotInlined() + { + System.Console.WriteLine(this); + } + + public void RecurseA0A3(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A0>> next = new A0A0A0>>(); + next.RecurseA0A0A0((depth - 1)); + } + + public void CreateAllTypesA0A3() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>>>>(); + A0.VerifyA0NotInlinedGenericStatic(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>>>>>>>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>>>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>>>>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>>>>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>>>>>>>>(); + A0A1>>>>>>>>.VerifyA0A1NotInlinedGenericStatic(); + A0A1.VerifyA0A1NotInlinedStatic(); + A0A1>>>.VerifyA0A1GenericStatic>>>>(); + A0A1>>>>.VerifyA0A1Static(); + A0A1> v21 = new A0A1>(); + v21.VerifyA0A1NotInlinedGeneric>>>(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1())); + i24.VerifyInterfaceGenericIA2(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic>(); + A0A0A0.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>>>>>>>.VerifyA0A0A0GenericStatic(); + A0A0A0.VerifyA0A0A0Static(); + A0A0A0>> v25 = new A0A0A0>>(); + v25.VerifyA0A0A0NotInlinedGeneric(); + A0A0A0 v26 = new A0A0A0(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>>>>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0())); + i28.VerifyInterfaceGenericIA2(); + A0A3.VerifyA0A3NotInlinedGenericStatic>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>>>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>(); + A0A1A2>.VerifyA0A1A2NotInlinedGenericStatic(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>.VerifyA0A1A2GenericStatic>(); + A0A1A2>.VerifyA0A1A2Static(); + A0A1A2 v37 = new A0A1A2(); + v37.VerifyA0A1A2NotInlinedGeneric(); + A0A1A2> v38 = new A0A1A2>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>())); + i40.VerifyInterfaceGenericIA2>>>(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedGenericStatic(); + A0A0A0A0>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>.VerifyA0A0A0A0GenericStatic>>(); + A0A0A0A0.VerifyA0A0A0A0Static(); + A0A0A0A0 v41 = new A0A0A0A0(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>(); + A0A0A0A0 v42 = new A0A0A0A0(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0())); + i44.VerifyInterfaceGenericIA2>(); + A0A4.VerifyA0A4NotInlinedGenericStatic>(); + A0A4>.VerifyA0A4NotInlinedStatic(); + A0A4>.VerifyA0A4GenericStatic(); + A0A4>.VerifyA0A4Static(); + A0A4>> v45 = new A0A4>>(); + v45.VerifyA0A4NotInlinedGeneric>>>(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3.VerifyA0A0A3NotInlinedGenericStatic>(); + A0A0A3>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>>.VerifyA0A0A3GenericStatic>(); + A0A0A3.VerifyA0A0A3Static(); + A0A0A3> v47 = new A0A0A3>(); + v47.VerifyA0A0A3NotInlinedGeneric>>>>>(); + A0A0A3>>> v48 = new A0A0A3>>>(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4.VerifyA0A3A4NotInlinedGenericStatic(); + A0A3A4.VerifyA0A3A4NotInlinedStatic(); + A0A3A4.VerifyA0A3A4GenericStatic>(); + A0A3A4>.VerifyA0A3A4Static(); + A0A3A4 v49 = new A0A3A4(); + v49.VerifyA0A3A4NotInlinedGeneric>>>>(); + A0A3A4> v50 = new A0A3A4>(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1.VerifyA0A0A1A1NotInlinedGenericStatic(); + A0A0A1A1.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1>>>.VerifyA0A0A1A1GenericStatic>>(); + A0A0A1A1>.VerifyA0A0A1A1Static(); + A0A0A1A1 v51 = new A0A0A1A1(); + v51.VerifyA0A0A1A1NotInlinedGeneric(); + A0A0A1A1 v52 = new A0A0A1A1(); + v52.VerifyA0A0A1A1NotInlined(); + } + } + + public class A0A0A3 : A0A0 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A3NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A3NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A0A3GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A0A3Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A3NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A3NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A0A3(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A4>>> next = new A0A4>>>(); + next.RecurseA0A4((depth - 1)); + } + + public void CreateAllTypesA0A0A3() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2(); + A0.VerifyA0NotInlinedGenericStatic>>>>>>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>>>>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>>>>>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>>>>>>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>>>>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>>>>>>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>>>>(); + A0A1>>>>>>>>.VerifyA0A1NotInlinedGenericStatic>>>>>>>>>>(); + A0A1>>>>>>>>>>.VerifyA0A1NotInlinedStatic(); + A0A1>.VerifyA0A1GenericStatic>>(); + A0A1>.VerifyA0A1Static(); + A0A1 v21 = new A0A1(); + v21.VerifyA0A1NotInlinedGeneric>>>>>>>>(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1())); + i24.VerifyInterfaceGenericIA2(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic>>>>>>>>>>(); + A0A0A0>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>>>>>>>>>.VerifyA0A0A0GenericStatic(); + A0A0A0.VerifyA0A0A0Static(); + A0A0A0 v25 = new A0A0A0(); + v25.VerifyA0A0A0NotInlinedGeneric(); + A0A0A0> v26 = new A0A0A0>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>())); + i28.VerifyInterfaceGenericIA2>(); + A0A3.VerifyA0A3NotInlinedGenericStatic(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>>>>>>>>>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2(); + A0A1A2.VerifyA0A1A2NotInlinedGenericStatic>>>>>>>>>>(); + A0A1A2>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>>.VerifyA0A1A2GenericStatic>>>>>>>>>>(); + A0A1A2>>.VerifyA0A1A2Static(); + A0A1A2> v37 = new A0A1A2>(); + v37.VerifyA0A1A2NotInlinedGeneric>>>>>>>>>>(); + A0A1A2> v38 = new A0A1A2>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>())); + i40.VerifyInterfaceGenericIA2>(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedGenericStatic(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0.VerifyA0A0A0A0GenericStatic>(); + A0A0A0A0.VerifyA0A0A0A0Static(); + A0A0A0A0>> v41 = new A0A0A0A0>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>(); + A0A0A0A0 v42 = new A0A0A0A0(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>>>>>>>>>())); + i44.VerifyInterfaceGenericIA2>>(); + A0A4>>.VerifyA0A4NotInlinedGenericStatic(); + A0A4>>>>>>>>>>>.VerifyA0A4NotInlinedStatic(); + A0A4.VerifyA0A4GenericStatic>>(); + A0A4>.VerifyA0A4Static(); + A0A4 v45 = new A0A4(); + v45.VerifyA0A4NotInlinedGeneric>(); + A0A4>>>>>>>>>> v46 = new A0A4>>>>>>>>>>(); + v46.VerifyA0A4NotInlined(); + A0A0A3.VerifyA0A0A3NotInlinedGenericStatic>>(); + A0A0A3>>>>>>>>>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>>.VerifyA0A0A3GenericStatic>>>>(); + A0A0A3>>>>.VerifyA0A0A3Static(); + A0A0A3>>> v47 = new A0A0A3>>>(); + v47.VerifyA0A0A3NotInlinedGeneric>>(); + A0A0A3>> v48 = new A0A0A3>>(); + v48.VerifyA0A0A3NotInlined(); + A0A3A4.VerifyA0A3A4NotInlinedGenericStatic>>(); + A0A3A4.VerifyA0A3A4NotInlinedStatic(); + A0A3A4>>>.VerifyA0A3A4GenericStatic>>(); + A0A3A4.VerifyA0A3A4Static(); + A0A3A4>>> v49 = new A0A3A4>>>(); + v49.VerifyA0A3A4NotInlinedGeneric>(); + A0A3A4 v50 = new A0A3A4(); + v50.VerifyA0A3A4NotInlined(); + A0A0A1A1>.VerifyA0A0A1A1NotInlinedGenericStatic(); + A0A0A1A1>>>.VerifyA0A0A1A1NotInlinedStatic(); + A0A0A1A1>>.VerifyA0A0A1A1GenericStatic(); + A0A0A1A1>>>.VerifyA0A0A1A1Static(); + A0A0A1A1 v51 = new A0A0A1A1(); + v51.VerifyA0A0A1A1NotInlinedGeneric>(); + A0A0A1A1>>>>>>>>>>> v52 = new A0A0A1A1>>>>>>>>>>>(); + v52.VerifyA0A0A1A1NotInlined(); + } + } +} diff --git a/tests/src/JIT/Generics/Coverage/chaos65204782cs.cs b/tests/src/JIT/Generics/Coverage/chaos65204782cs.cs new file mode 100644 index 0000000..aef93fa --- /dev/null +++ b/tests/src/JIT/Generics/Coverage/chaos65204782cs.cs @@ -0,0 +1,4238 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +/// Generic chaos types +/// CommandLine: +///GenericChaos.exe /mtc:10 /mtcc:2 /mic:10 /ol:Cs /ol:Vb /mtpc:2 /mmtpc:2 +/// +///Data: +///Help: False +/// MaxGenerationDepth: 2 +/// MaxTypeParameterCount: 2 +/// MaxMethodTypeParameterCount: 2 +/// MaxTypeCount: 10 +/// MaxMethodCallDepth: 1000 +/// MaxTypeInheranceCount: 2 +/// MaxStaticFieldCount: 2 +/// MaxInterfaceCount: 10 +/// GenerateInterfaces: True +/// GenerateVirtualMethods: True +/// GenerateMethods: True +/// GenerateGenericMethods: True +/// GenerateNonInlinableMethods: True +/// GenerateStaticMethods: True +/// GenerateInstanceMethods: True +/// GenerateRecursiveMethods: True +/// GenerateStaticFields: True +/// GenerateInstanceFields: True +/// IntermediateTypeRealization: True +/// GenerateConstructorConstraints: True +/// GenerateTypeParameterConstraints: True +/// GenerateMethodParameterConstraints: True +/// OutputPath: chaos +/// OutputLanguages: +/// Cs +/// Vb +/// OutputNamespace: Chaos +/// ShowOutputInConsole: False +/// CompileAndRun: False +/// +namespace Chaos +{ + using System; + + + public interface IA1A2A5 : IA2 + where T0 : new() + where T1 : new() + { + } + + public class A0A3A6 : A0A3 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A3A6NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A3A6NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A3A6GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A3A6Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A3A6NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A3A6NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A3A6(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A0A1>>>, A0A3A6>>>>, IA1A2>> next = new A0A0A0A1>>>, A0A3A6>>>>, IA1A2>>(); + next.RecurseA0A0A0A1((depth - 1)); + } + + public void CreateAllTypesA0A3A6() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>, A0A0A1A2>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>(); + A0.VerifyA0NotInlinedGenericStatic>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>, A0A0A1A2>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>, A0A0A1A2>>(); + A0A1.VerifyA0A1NotInlinedGenericStatic(); + A0A1.VerifyA0A1NotInlinedStatic(); + A0A1>.VerifyA0A1GenericStatic>>(); + A0A1>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>.VerifyA0A1Static(); + A0A1>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>> v21 = new A0A1>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>(); + v21.VerifyA0A1NotInlinedGeneric>>(); + A0A1>> v22 = new A0A1>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>())); + i24.VerifyInterfaceGenericIA2>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>>(); + A0A0A0>.VerifyA0A0A0NotInlinedGenericStatic>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>(); + A0A0A0.VerifyA0A0A0NotInlinedStatic(); + A0A0A0.VerifyA0A0A0GenericStatic(); + A0A0A0>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>>.VerifyA0A0A0Static(); + A0A0A0>, A0A0A1A2>> v25 = new A0A0A0>, A0A0A1A2>>(); + v25.VerifyA0A0A0NotInlinedGeneric>(); + A0A0A0>, A0A0A1A2>> v26 = new A0A0A0>, A0A0A1A2>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>, A0A0A1A2>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>>())); + i28.VerifyInterfaceGenericIA2>(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>(); + A0A1A2>>.VerifyA0A1A2NotInlinedGenericStatic>(); + A0A1A2>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>.VerifyA0A1A2GenericStatic(); + A0A1A2>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>.VerifyA0A1A2Static(); + A0A1A2>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>> v37 = new A0A1A2>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>>(); + v37.VerifyA0A1A2NotInlinedGeneric>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>(); + A0A1A2>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>> v38 = new A0A1A2>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>())); + i40.VerifyInterfaceGenericIA2>>(); + A0A0A0A0>.VerifyA0A0A0A0NotInlinedGenericStatic>(); + A0A0A0A0>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>.VerifyA0A0A0A0GenericStatic>(); + A0A0A0A0>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>> v41 = new A0A0A0A0>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric(); + A0A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>> v42 = new A0A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>())); + i44.VerifyInterfaceGenericIA2>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>(); + A0A4>>.VerifyA0A4NotInlinedGenericStatic>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>(); + A0A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>.VerifyA0A4NotInlinedStatic(); + A0A4>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>>.VerifyA0A4GenericStatic(); + A0A4>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>.VerifyA0A4Static(); + A0A4>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>> v45 = new A0A4>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>>(); + v45.VerifyA0A4NotInlinedGeneric>(); + A0A4>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>> v46 = new A0A4>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>(); + v46.VerifyA0A4NotInlined(); + A0A0A3>.VerifyA0A0A3NotInlinedGenericStatic>>(); + A0A0A3>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>.VerifyA0A0A3GenericStatic(); + A0A0A3>.VerifyA0A0A3Static(); + A0A0A3>, A0A0A1A2>> v47 = new A0A0A3>, A0A0A1A2>>(); + v47.VerifyA0A0A3NotInlinedGeneric(); + A0A0A3 v48 = new A0A0A3(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4, A0A0A3>.VerifyA0A1A4NotInlinedGenericStatic(); + A0A1A4>>>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>, IA1>.VerifyA0A1A4GenericStatic>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>(); + A0A1A4>, A0A0A0A0A0>.VerifyA0A1A4Static(); + A0A1A4>, A0A0A1A2>, A0A1A2A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>> v49 = new A0A1A4>, A0A0A1A2>, A0A1A2A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>(); + v49.VerifyA0A1A4NotInlinedGeneric>(); + A0A1A4, A0A3A6> v50 = new A0A1A4, A0A3A6>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>.VerifyA0A0A0A1NotInlinedGenericStatic>(); + A0A0A0A1, IA2A6>>, A0A1A4>>>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>.VerifyA0A0A0A1GenericStatic(); + A0A0A0A1>, A0A1A2A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>.VerifyA0A0A0A1Static(); + A0A0A0A1, A0A1>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>> v51 = new A0A0A0A1, A0A1>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>(); + A0A0A0A1, A0A0A3>>>> v52 = new A0A0A0A1, A0A0A3>>>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>.VerifyA0A3A6NotInlinedGenericStatic>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>(); + A0A3A6.VerifyA0A3A6NotInlinedStatic(); + A0A3A6>.VerifyA0A3A6GenericStatic, A0A0A3>>>>>(); + A0A3A6>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>.VerifyA0A3A6Static(); + A0A3A6>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>> v53 = new A0A3A6>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>(); + v53.VerifyA0A3A6NotInlinedGeneric(); + A0A3A6>>> v54 = new A0A3A6>>>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2>>>.VerifyA0A0A1A2NotInlinedGenericStatic(); + A0A0A1A2, A0A0A3>>>>>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2>>>.VerifyA0A0A1A2GenericStatic>>>(); + A0A0A1A2.VerifyA0A0A1A2Static(); + A0A0A1A2>>>> v55 = new A0A0A1A2>>>>(); + v55.VerifyA0A0A1A2NotInlinedGeneric(); + A0A0A1A2> v56 = new A0A0A1A2>(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>, A0A0A0>>>.VerifyA0A1A2A3NotInlinedGenericStatic, A0A3A6>>(); + A0A1A2A3>>>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3>>>>.VerifyA0A1A2A3GenericStatic(); + A0A1A2A3, A0A0A0>>>.VerifyA0A1A2A3Static(); + A0A1A2A3>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>, A0A0A0>>> v57 = new A0A1A2A3>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>, A0A0A0>>>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>>>(); + A0A1A2A3, A0A0A0A0>> v58 = new A0A1A2A3, A0A0A0A0>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0, A0A0A3>>>>, A0A1A2>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>.VerifyA0A0A0A0A0NotInlinedGenericStatic>>>>(); + A0A0A0A0A0>, A0A0A0A0A0, A0A0A3>>>>, A0A1A2>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>.VerifyA0A0A0A0A0GenericStatic>>(); + A0A0A0A0A0>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>, A0A0A0A1, A0A0A3>>>>>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0, A0A0A3>>>>, A0A0A0A0A0>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>, A0A0A0A1, A0A0A3>>>>>> v59 = new A0A0A0A0A0, A0A0A3>>>>, A0A0A0A0A0>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>, A0A0A0A1, A0A0A3>>>>>>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric, A0A3A6>>(); + A0A0A0A0A0>>>> v60 = new A0A0A0A0A0>>>>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public class A0 : object, IA1, IA2 + { + + private static A0A1A2>> _sfA00; + + private A0 _fA01; + + public void VerifyInterfaceIA1() + { + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A1A2>>(); + this._fA01 = new A0(); + } + + public void VerifyInterfaceGenericIA1() + where K : new() + { + System.Console.WriteLine(typeof(A0)); + K t1 = new K(); + A0._sfA00 = new A0A1A2>>(); + this._fA01 = new A0(); + } + + public void VerifyInterfaceIA2() + { + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A1A2>>(); + this._fA01 = new A0(); + } + + public void VerifyInterfaceGenericIA2() + where K : new() + { + System.Console.WriteLine(typeof(A0)); + K t1 = new K(); + A0._sfA00 = new A0A1A2>>(); + this._fA01 = new A0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + T t2 = new T(); + A0._sfA00 = new A0A1A2>>(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0NotInlinedStatic() + { + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A1A2>>(); + } + + public static void VerifyA0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + T t2 = new T(); + A0._sfA00 = new A0A1A2>>(); + } + + public static void VerifyA0Static() + { + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A1A2>>(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + T t3 = new T(); + A0._sfA00 = new A0A1A2>>(); + this._fA01 = new A0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0NotInlined() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A1A2>>(); + this._fA01 = new A0(); + } + + public virtual void VirtualVerifyGeneric() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A1A2>>(); + this._fA01 = new A0(); + } + + public virtual void VirtualVerify() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0)); + A0._sfA00 = new A0A1A2>>(); + this._fA01 = new A0(); + } + + public void RecurseA0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A0A0A0>>> next = new A0A0A0A0A0>>>(); + next.RecurseA0A0A0A0A0((depth - 1)); + } + + public void DeepRecursion() + { + this.RecurseA0(1000); + System.Console.WriteLine(); + } + + public void CreateAllTypesA0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>>>>(); + A0.VerifyA0NotInlinedGenericStatic(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>>>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>, A0A3A6>>>>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>>, A0A3A6>>>>>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>, IA1>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>>>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>>>>, A0A1A4>>>, IA1>>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>>(); + A0A1.VerifyA0A1NotInlinedGenericStatic>(); + A0A1>>>, A0A3A6>>>>>>>.VerifyA0A1NotInlinedStatic(); + A0A1.VerifyA0A1GenericStatic>>>>>(); + A0A1.VerifyA0A1Static(); + A0A1 v21 = new A0A1(); + v21.VerifyA0A1NotInlinedGeneric>>>>>(); + A0A1>>>, A0A3A6>>>>>> v22 = new A0A1>>>, A0A3A6>>>>>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>>, A0A3A6>>>>>>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>())); + i24.VerifyInterfaceGenericIA2>>>>>(); + A0A0A0>>.VerifyA0A0A0NotInlinedGenericStatic>>>>, A0A1A4>>>, IA1>>>(); + A0A0A0>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>>.VerifyA0A0A0GenericStatic>>>, A0A3A6>>>>>>>(); + A0A0A0.VerifyA0A0A0Static(); + A0A0A0>>>>, A0A1A4>>>, IA1>>> v25 = new A0A0A0>>>>, A0A1A4>>>, IA1>>>(); + v25.VerifyA0A0A0NotInlinedGeneric>>>, A0A3A6>>>>, IA1A2>>>(); + A0A0A0>>>> v26 = new A0A0A0>>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>>>, A0A3A6>>>>>>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>>>>>())); + i28.VerifyInterfaceGenericIA2>>>, IA1>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>>, A0A3A6>>>>, IA1A2>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>>, A0A3A6>>>>>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>>, A0A1A4>>>, IA1>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>>>>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>>>, A0A3A6>>>>>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>>, A0A3A6>>>>>>>(); + A0A1A2>>>>>>.VerifyA0A1A2NotInlinedGenericStatic>>>(); + A0A1A2>>>>>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>>>.VerifyA0A1A2GenericStatic(); + A0A1A2>>>>.VerifyA0A1A2Static(); + A0A1A2>>>>> v37 = new A0A1A2>>>>>(); + v37.VerifyA0A1A2NotInlinedGeneric>>>>(); + A0A1A2>>> v38 = new A0A1A2>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>>>, A0A1A4>>>, IA1>>>())); + i40.VerifyInterfaceGenericIA2>>>, A0A3A6>>>>>>(); + A0A0A0A0>>>, A0A3A6>>>>>>>.VerifyA0A0A0A0NotInlinedGenericStatic>>>, A0A3A6>>>>, IA1A2>>>(); + A0A0A0A0>>>, A0A3A6>>>>, IA1A2>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>>>, A0A1A4>>>, IA1>>>.VerifyA0A0A0A0GenericStatic(); + A0A0A0A0>>>, A0A3A6>>>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0>>>>>> v41 = new A0A0A0A0>>>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>>, A0A3A6>>>>>>>(); + A0A0A0A0 v42 = new A0A0A0A0(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>>>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>())); + i44.VerifyInterfaceGenericIA2>>>>, A0A1A4>>>, IA1>>>>(); + A0A4.VerifyA0A4NotInlinedGenericStatic>>>>, A0A1A4>>>, IA1>>>(); + A0A4>>>>, A0A1A4>>>, IA1>>>.VerifyA0A4NotInlinedStatic(); + A0A4>>>>, A0A1A4>>>, IA1>>>>.VerifyA0A4GenericStatic>>>>>>(); + A0A4.VerifyA0A4Static(); + A0A4 v45 = new A0A4(); + v45.VerifyA0A4NotInlinedGeneric>>>>>>(); + A0A4>> v46 = new A0A4>>(); + v46.VerifyA0A4NotInlined(); + A0A0A3>>>>>>.VerifyA0A0A3NotInlinedGenericStatic>>>(); + A0A0A3>>>, IA1>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>>, A0A3A6>>>>, IA1A2>>>.VerifyA0A0A3GenericStatic>>(); + A0A0A3>>>, A0A3A6>>>>>>.VerifyA0A0A3Static(); + A0A0A3>>>, IA1>> v47 = new A0A0A3>>>, IA1>>(); + v47.VerifyA0A0A3NotInlinedGeneric>>>, IA1>>(); + A0A0A3>>>> v48 = new A0A0A3>>>>(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4>>, A0A3A6>>.VerifyA0A1A4NotInlinedGenericStatic>>>, A0A3A6>>>>, IA1A2>>>(); + A0A1A4>>>, A0A0>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4>>>, A0A0>, IA2A6>>, A0A1A4>>>>.VerifyA0A1A4GenericStatic>>>>(); + A0A1A4>>>, A0A0>.VerifyA0A1A4Static(); + A0A1A4>>>>>> v49 = new A0A1A4>>>>>>(); + v49.VerifyA0A1A4NotInlinedGeneric(); + A0A1A4>>>>, A0A1A4>>>, IA1>>>> v50 = new A0A1A4>>>>, A0A1A4>>>, IA1>>>>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1>>>, A0A3A6>>>>>, A0A1A2A3>>>>, A0A1A4>>>, IA1>>>.VerifyA0A0A0A1NotInlinedGenericStatic>>>>, A0A1A4>>>, IA1>>>>(); + A0A0A0A1>>>>, A0A1A4>>>, IA1>>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>, IA1>.VerifyA0A0A0A1GenericStatic>>>>, A0A1A4>>>, IA1>>>(); + A0A0A0A1>>>>, A0A1A4>>>, IA1>>>>, A0A1A4>>>>, A0A1A4>>>, IA1>>>>>.VerifyA0A0A0A1Static(); + A0A0A0A1>>>>, A0A1A4>>>, IA1>>>, A0A4>>> v51 = new A0A0A0A1>>>>, A0A1A4>>>, IA1>>>, A0A4>>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric(); + A0A0A0A1>>>>>, IA1A2>> v52 = new A0A0A0A1>>>>>, IA1A2>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6.VerifyA0A3A6NotInlinedGenericStatic>>>(); + A0A3A6>>>>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6.VerifyA0A3A6GenericStatic>>>>, A0A1A4>>>, IA1>>>>>(); + A0A3A6>>>>.VerifyA0A3A6Static(); + A0A3A6>>>>>, IA1A2>>> v53 = new A0A3A6>>>>>, IA1A2>>>(); + v53.VerifyA0A3A6NotInlinedGeneric>>>(); + A0A3A6>>>>, A0A1A4>>>, IA1>>> v54 = new A0A3A6>>>>, A0A1A4>>>, IA1>>>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2>>>>>>.VerifyA0A0A1A2NotInlinedGenericStatic>>>>>(); + A0A0A1A2>>>>>>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2.VerifyA0A0A1A2GenericStatic(); + A0A0A1A2>>>>>>.VerifyA0A0A1A2Static(); + A0A0A1A2>>>>> v55 = new A0A0A1A2>>>>>(); + v55.VerifyA0A0A1A2NotInlinedGeneric>>>>, A0A1A4>>>, IA1>>>(); + A0A0A1A2>>> v56 = new A0A0A1A2>>>(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>>>>, A0A1A4>>>, IA1>>>.VerifyA0A1A2A3NotInlinedGenericStatic>>>>, A0A1A4>>>, IA1>>>>(); + A0A1A2A3>>>>, A0A1A4>>>, IA1>>>, A0A0A3>>>>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3>>>>, A0A1A4>>>, IA1>>>, A0A1>>>.VerifyA0A1A2A3GenericStatic>>>(); + A0A1A2A3>>>>, A0A1A4>>>, IA1>>>, A0A1>>>, A0>.VerifyA0A1A2A3Static(); + A0A1A2A3>>>>, A0A1A4>>>, IA1>>>>> v57 = new A0A1A2A3>>>>, A0A1A4>>>, IA1>>>>>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>>>(); + A0A1A2A3>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A1>>>>>, IA1A2>>> v58 = new A0A1A2A3>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A1>>>>>, IA1A2>>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0>>>>>, IA1A2>>, A0>.VerifyA0A0A0A0A0NotInlinedGenericStatic>>>(); + A0A0A0A0A0>>>>>, IA1A2>>, A0>>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0>>>>, A0A1A4>>>, IA1>>>>.VerifyA0A0A0A0A0GenericStatic(); + A0A0A0A0A0>>>>>, IA1A2>>, A0A4>>>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0>>>>, A0A1A4>>>, IA1>>>, A0A3> v59 = new A0A0A0A0A0>>>>, A0A1A4>>>, IA1>>>, A0A3>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric>>>(); + A0A0A0A0A0>>>>> v60 = new A0A0A0A0A0>>>>>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public class A0A0A0A1 : A0A0A0 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0A1NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0A1NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A0A0A1GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A0A0A1Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0A1NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0A1NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A0A0A1(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A1A4>>>, IA1> next = new A0A1A4>>>, IA1>(); + next.RecurseA0A1A4((depth - 1)); + } + + public void CreateAllTypesA0A0A0A1() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>>>(); + A0.VerifyA0NotInlinedGenericStatic(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric, A0A0A3>>>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2(); + A0A1>>.VerifyA0A1NotInlinedGenericStatic>>(); + A0A1, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>>.VerifyA0A1NotInlinedStatic(); + A0A1>.VerifyA0A1GenericStatic, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>>(); + A0A1>>.VerifyA0A1Static(); + A0A1>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>> v21 = new A0A1>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>())); + i24.VerifyInterfaceGenericIA2>(); + A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>.VerifyA0A0A0NotInlinedGenericStatic(); + A0A0A0>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>>.VerifyA0A0A0GenericStatic(); + A0A0A0>>>.VerifyA0A0A0Static(); + A0A0A0 v25 = new A0A0A0(); + v25.VerifyA0A0A0NotInlinedGeneric>(); + A0A0A0>>, A0A1>>>>>>> v26 = new A0A0A0>>, A0A1>>>>>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>())); + i28.VerifyInterfaceGenericIA2>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2(); + A0A1A2, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>>.VerifyA0A1A2NotInlinedGenericStatic(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>>.VerifyA0A1A2GenericStatic>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>(); + A0A1A2, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>>.VerifyA0A1A2Static(); + A0A1A2>> v37 = new A0A1A2>>(); + v37.VerifyA0A1A2NotInlinedGeneric(); + A0A1A2>>> v38 = new A0A1A2>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>())); + i40.VerifyInterfaceGenericIA2>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>(); + A0A0A0A0>>.VerifyA0A0A0A0NotInlinedGenericStatic>(); + A0A0A0A0>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0.VerifyA0A0A0A0GenericStatic>(); + A0A0A0A0.VerifyA0A0A0A0Static(); + A0A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>> v41 = new A0A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>(); + A0A0A0A0>> v42 = new A0A0A0A0>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>())); + i44.VerifyInterfaceGenericIA2, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>>(); + A0A4>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>.VerifyA0A4NotInlinedGenericStatic(); + A0A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>.VerifyA0A4NotInlinedStatic(); + A0A4.VerifyA0A4GenericStatic(); + A0A4, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>>.VerifyA0A4Static(); + A0A4>>> v45 = new A0A4>>>(); + v45.VerifyA0A4NotInlinedGeneric>>>>(); + A0A4> v46 = new A0A4>(); + v46.VerifyA0A4NotInlined(); + A0A0A3>>.VerifyA0A0A3NotInlinedGenericStatic>>>(); + A0A0A3>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>.VerifyA0A0A3GenericStatic>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>(); + A0A0A3, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>>.VerifyA0A0A3Static(); + A0A0A3>> v47 = new A0A0A3>>(); + v47.VerifyA0A0A3NotInlinedGeneric, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>>(); + A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>> v48 = new A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>, A0A1>>>.VerifyA0A1A4NotInlinedGenericStatic>>>(); + A0A1A4, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>, A0>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4>>, A0A1>>>.VerifyA0A1A4GenericStatic>>(); + A0A1A4>>, A0A1>>>.VerifyA0A1A4Static(); + A0A1A4, A0> v49 = new A0A1A4, A0>(); + v49.VerifyA0A1A4NotInlinedGeneric, A0>>(); + A0A1A4>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>> v50 = new A0A1A4>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>, A0A0>.VerifyA0A0A0A1NotInlinedGenericStatic>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>(); + A0A0A0A1>, IA1A2>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>>, A0A1A2A3, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>>.VerifyA0A0A0A1GenericStatic(); + A0A0A0A1>>.VerifyA0A0A0A1Static(); + A0A0A0A1 v51 = new A0A0A0A1(); + v51.VerifyA0A0A0A1NotInlinedGeneric(); + A0A0A0A1>, A0A0A1A2> v52 = new A0A0A0A1>, A0A0A1A2>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6.VerifyA0A3A6NotInlinedGenericStatic>, A0A0A1A2>>(); + A0A3A6>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6>>.VerifyA0A3A6GenericStatic>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>(); + A0A3A6>>.VerifyA0A3A6Static(); + A0A3A6>>> v53 = new A0A3A6>>>(); + v53.VerifyA0A3A6NotInlinedGeneric>(); + A0A3A6 v54 = new A0A3A6(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2>>.VerifyA0A0A1A2NotInlinedGenericStatic>>>(); + A0A0A1A2>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2>.VerifyA0A0A1A2GenericStatic>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>(); + A0A0A1A2>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>.VerifyA0A0A1A2Static(); + A0A0A1A2>> v55 = new A0A0A1A2>>(); + v55.VerifyA0A0A1A2NotInlinedGeneric>>>(); + A0A0A1A2> v56 = new A0A0A1A2>(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>>, A0A0A0>>.VerifyA0A1A2A3NotInlinedGenericStatic>, A0A0A1A2>>(); + A0A1A2A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>, A0A1>>>.VerifyA0A1A2A3GenericStatic>(); + A0A1A2A3>>.VerifyA0A1A2A3Static(); + A0A1A2A3>, A0A0A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>> v57 = new A0A1A2A3>, A0A0A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>>>(); + A0A1A2A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>> v58 = new A0A1A2A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0.VerifyA0A0A0A0A0NotInlinedGenericStatic(); + A0A0A0A0A0>>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0.VerifyA0A0A0A0A0GenericStatic>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>(); + A0A0A0A0A0>, A0A3>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0>, A0A0A1A2>, A0A0A1> v59 = new A0A0A0A0A0>, A0A0A1A2>, A0A0A1>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric>, A0A0A1A2>, A0A0A1>>(); + A0A0A0A0A0 v60 = new A0A0A0A0A0(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public class A0A0A1 : A0A0, IA2 + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A1NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T t1 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A1NotInlinedStatic() + { + } + + public static void VerifyA0A0A1GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T t1 = new T(); + } + + public static void VerifyA0A0A1Static() + { + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A1NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A1NotInlined() + { + System.Console.WriteLine(this); + } + + public void RecurseA0A0A1(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A3 next = new A0A3(); + next.RecurseA0A3((depth - 1)); + } + + public void CreateAllTypesA0A0A1() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>(); + A0.VerifyA0NotInlinedGenericStatic>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>, A0A1A2>>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1, A0A0A1A2>>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2, IA1A2A5, A0A0A3>>>>>(); + A0A1.VerifyA0A1NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>>(); + A0A1>>.VerifyA0A1NotInlinedStatic(); + A0A1>>>.VerifyA0A1GenericStatic>>>(); + A0A1.VerifyA0A1Static(); + A0A1> v21 = new A0A1>(); + v21.VerifyA0A1NotInlinedGeneric>>(); + A0A1, IA1A2A5, A0A0A3>>>>> v22 = new A0A1, IA1A2A5, A0A0A3>>>>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>())); + i24.VerifyInterfaceGenericIA2, A0A0A1A2>>>(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic(); + A0A0A0>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>.VerifyA0A0A0GenericStatic(); + A0A0A0.VerifyA0A0A0Static(); + A0A0A0, IA1A2A5, A0A0A3>>>>> v25 = new A0A0A0, IA1A2A5, A0A0A3>>>>>(); + v25.VerifyA0A0A0NotInlinedGeneric, IA1A2A5, A0A0A3>>>>>(); + A0A0A0 v26 = new A0A0A0(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>>())); + i28.VerifyInterfaceGenericIA2, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2(); + A0A1A2>>>.VerifyA0A1A2NotInlinedGenericStatic>>>(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>>.VerifyA0A1A2GenericStatic>(); + A0A1A2>>>.VerifyA0A1A2Static(); + A0A1A2, A0A0A1A2>>> v37 = new A0A1A2, A0A0A1A2>>>(); + v37.VerifyA0A1A2NotInlinedGeneric(); + A0A1A2 v38 = new A0A1A2(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>())); + i40.VerifyInterfaceGenericIA2>>>(); + A0A0A0A0, IA1A2A5, A0A0A3>>>>>.VerifyA0A0A0A0NotInlinedGenericStatic>>>(); + A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>>.VerifyA0A0A0A0GenericStatic>>(); + A0A0A0A0>, A0A1A2>>>.VerifyA0A0A0A0Static(); + A0A0A0A0, IA1A2A5, A0A0A3>>>>> v41 = new A0A0A0A0, IA1A2A5, A0A0A3>>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric(); + A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>> v42 = new A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0())); + i44.VerifyInterfaceGenericIA2, A0A0A1A2>>>(); + A0A4.VerifyA0A4NotInlinedGenericStatic(); + A0A4>>>.VerifyA0A4NotInlinedStatic(); + A0A4>>>.VerifyA0A4GenericStatic(); + A0A4>.VerifyA0A4Static(); + A0A4, IA1A2A5, A0A0A3>>>>> v45 = new A0A4, IA1A2A5, A0A0A3>>>>>(); + v45.VerifyA0A4NotInlinedGeneric(); + A0A4, IA1A2A5, A0A0A3>>>>> v46 = new A0A4, IA1A2A5, A0A0A3>>>>>(); + v46.VerifyA0A4NotInlined(); + A0A0A3.VerifyA0A0A3NotInlinedGenericStatic>>>(); + A0A0A3>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>>.VerifyA0A0A3GenericStatic, IA1A2A5, A0A0A3>>>>>(); + A0A0A3, IA1A2A5, A0A0A3>>>>>.VerifyA0A0A3Static(); + A0A0A3, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>> v47 = new A0A0A3, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>(); + v47.VerifyA0A0A3NotInlinedGeneric, IA1A2A5, A0A0A3>>>>>(); + A0A0A3>>> v48 = new A0A0A3>>>(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4, IA1A2A5, A0A0A3>>>>, IA1A5>.VerifyA0A1A4NotInlinedGenericStatic>>(); + A0A1A4>>, A0A0A0>>>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4, IA1A2A5, A0A0A3>>>>, IA1>.VerifyA0A1A4GenericStatic>>>(); + A0A1A4>>, A0A0A1A2>.VerifyA0A1A4Static(); + A0A1A4>>, A0A0A1A2>, IA1A2>> v49 = new A0A1A4>>, A0A0A1A2>, IA1A2>>(); + v49.VerifyA0A1A4NotInlinedGeneric(); + A0A1A4, IA1A2A5, A0A0A3>>>>, A0A0A1A2> v50 = new A0A1A4, IA1A2A5, A0A0A3>>>>, A0A0A1A2>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1.VerifyA0A0A0A1NotInlinedGenericStatic>>>(); + A0A0A0A1>>, A0A0A0>>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>>, A0A4, IA1A2A5, A0A0A3>>>>>>.VerifyA0A0A0A1GenericStatic(); + A0A0A0A1>>, A0A0A0A0>.VerifyA0A0A0A1Static(); + A0A0A0A1, A0A0A3>>>> v51 = new A0A0A0A1, A0A0A3>>>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric(); + A0A0A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>> v52 = new A0A0A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>.VerifyA0A3A6NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>(); + A0A3A6>>>>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6>.VerifyA0A3A6GenericStatic>>(); + A0A3A6, IA1A2A5, A0A0A3>>>>>, IA1A2>>>.VerifyA0A3A6Static(); + A0A3A6, IA1A2A5, A0A0A3>>>>, A0A0A1A2>> v53 = new A0A3A6, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>(); + v53.VerifyA0A3A6NotInlinedGeneric(); + A0A3A6, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>> v54 = new A0A3A6, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2, IA1A2A5, A0A0A3>>>>>>.VerifyA0A0A1A2NotInlinedGenericStatic(); + A0A0A1A2, IA1A2A5, A0A0A3>>>>>>>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2, IA1A2A5, A0A0A3>>>>>, IA1A2>>>.VerifyA0A0A1A2GenericStatic, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>(); + A0A0A1A2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>.VerifyA0A0A1A2Static(); + A0A0A1A2> v55 = new A0A0A1A2>(); + v55.VerifyA0A0A1A2NotInlinedGeneric>>>(); + A0A0A1A2, IA1A2A5, A0A0A3>>>>>, IA1A2>>> v56 = new A0A0A1A2, IA1A2A5, A0A0A3>>>>>, IA1A2>>>(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>.VerifyA0A1A2A3NotInlinedGenericStatic>>>(); + A0A1A2A3>, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>, A0A0A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3, IA1A2A5, A0A0A3>>>>>, A0A0A0>>>.VerifyA0A1A2A3GenericStatic>>>(); + A0A1A2A3, IA1A2A5, A0A0A3>>>>>, A0A0A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>>>.VerifyA0A1A2A3Static(); + A0A1A2A3, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A1A2, IA1A2A5, A0A0A3>>>>>, IA1A2>>>> v57 = new A0A1A2A3, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A1A2, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>>(); + A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>> v58 = new A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0, IA1A2A5, A0A0A3>>>>>, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A0A0A0A0NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A1A2>, A0A1A4, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A1A2>, A0A1A4, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>, A0A0>.VerifyA0A0A0A0A0GenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>(); + A0A0A0A0A0>>, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A1A2>, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>> v59 = new A0A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A1A2>, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric(); + A0A0A0A0A0, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A0>>> v60 = new A0A0A0A0A0, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A0>>>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public class A0A0 : A0, IA1, IA2 + { + + private A0A0A0A0 _fA0A01; + + private static A0 _sfA0A00; + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + T t2 = new T(); + A0A0._sfA0A00 = new A0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0NotInlinedStatic() + { + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0(); + } + + public static void VerifyA0A0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + T t2 = new T(); + A0A0._sfA0A00 = new A0(); + } + + public static void VerifyA0A0Static() + { + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + T t3 = new T(); + A0A0._sfA0A00 = new A0(); + this._fA0A01 = new A0A0A0A0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0NotInlined() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0(); + this._fA0A01 = new A0A0A0A0(); + } + + public override void VirtualVerifyGeneric() + { + base.VirtualVerifyGeneric(); + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0(); + this._fA0A01 = new A0A0A0A0(); + } + + public override void VirtualVerify() + { + base.VirtualVerify(); + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(A0A0)); + A0A0._sfA0A00 = new A0(); + this._fA0A01 = new A0A0A0A0(); + } + + public void RecurseA0A0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0 next = new A0(); + next.RecurseA0((depth - 1)); + } + + public void CreateAllTypesA0A0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2(); + A0.VerifyA0NotInlinedGenericStatic>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>>>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>>>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A1>>>>>, IA1A2>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>>>>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>>>>>, IA1A2>>>(); + A0A1>>>>.VerifyA0A1NotInlinedGenericStatic>>>>>>(); + A0A1.VerifyA0A1NotInlinedStatic(); + A0A1>>>>, A0A1A4>>>, IA1>>>>>.VerifyA0A1GenericStatic>>>(); + A0A1>>>>, A0A1A4>>>, IA1>>>>.VerifyA0A1Static(); + A0A1>>>>>> v21 = new A0A1>>>>>>(); + v21.VerifyA0A1NotInlinedGeneric>>>>>, IA1A2>>>(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A1>>>>>, IA1A2>>>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>>>, A0A1A4>>>, IA1>>>>())); + i24.VerifyInterfaceGenericIA2>>>>(); + A0A0A0>>>>, A0A1A4>>>, IA1>>>>.VerifyA0A0A0NotInlinedGenericStatic>>>>, A0A1A4>>>, IA1>>>>>(); + A0A0A0>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A1>>>>>, IA1A2>>>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>>>.VerifyA0A0A0GenericStatic>>>(); + A0A0A0>>>>, A0A1A4>>>, IA1>>>>>.VerifyA0A0A0Static(); + A0A0A0>>>>, A0A1A4>>>, IA1>>>> v25 = new A0A0A0>>>>, A0A1A4>>>, IA1>>>>(); + v25.VerifyA0A0A0NotInlinedGeneric(); + A0A0A0>>> v26 = new A0A0A0>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>())); + i28.VerifyInterfaceGenericIA2>>>>, A0A1A4>>>, IA1>>>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>>>, A0A1A4>>>, IA1>>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>>>>, A0A1A4>>>, IA1>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>>>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>>>, A0A1A4>>>, IA1>>>>>(); + A0A1A2.VerifyA0A1A2NotInlinedGenericStatic>(); + A0A1A2>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A1>>>>>, IA1A2>>>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2.VerifyA0A1A2GenericStatic>>>>, A0A1A4>>>, IA1>>>>>(); + A0A1A2>>>>>.VerifyA0A1A2Static(); + A0A1A2 v37 = new A0A1A2(); + v37.VerifyA0A1A2NotInlinedGeneric>>>>>(); + A0A1A2> v38 = new A0A1A2>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>>, A0A1A4>>>, IA1>>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>>>>, IA1A2>>>())); + i40.VerifyInterfaceGenericIA2>>>(); + A0A0A0A0>>>.VerifyA0A0A0A0NotInlinedGenericStatic>>>>>>(); + A0A0A0A0>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>.VerifyA0A0A0A0GenericStatic>>>>>, IA1A2>>>(); + A0A0A0A0.VerifyA0A0A0A0Static(); + A0A0A0A0>>>>, A0A1A4>>>, IA1>>>>> v41 = new A0A0A0A0>>>>, A0A1A4>>>, IA1>>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>>>, A0A1A4>>>, IA1>>>>>>(); + A0A0A0A0>>>>, A0A1A4>>>, IA1>>>> v42 = new A0A0A0A0>>>>, A0A1A4>>>, IA1>>>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>>>, A0A1A4>>>, IA1>>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>>>, A0A1A4>>>, IA1>>>>>())); + i44.VerifyInterfaceGenericIA2>>>(); + A0A4.VerifyA0A4NotInlinedGenericStatic(); + A0A4>>>>>.VerifyA0A4NotInlinedStatic(); + A0A4.VerifyA0A4GenericStatic(); + A0A4>>>>, A0A1A4>>>, IA1>>>>.VerifyA0A4Static(); + A0A4>>>>, A0A1A4>>>, IA1>>>>> v45 = new A0A4>>>>, A0A1A4>>>, IA1>>>>>(); + v45.VerifyA0A4NotInlinedGeneric(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3>>>>>.VerifyA0A0A3NotInlinedGenericStatic>(); + A0A0A3.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>.VerifyA0A0A3GenericStatic>>>(); + A0A0A3>>>>, A0A1A4>>>, IA1>>>>>.VerifyA0A0A3Static(); + A0A0A3>>>> v47 = new A0A0A3>>>>(); + v47.VerifyA0A0A3NotInlinedGeneric>>>>, A0A1A4>>>, IA1>>>>>(); + A0A0A3>>>> v48 = new A0A0A3>>>>(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A1>>>>>, IA1A2>>>, IA1A2A5, A0A0A3>>>>.VerifyA0A1A4NotInlinedGenericStatic>(); + A0A1A4>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A1>>>>>, IA1A2>>>, IA1A2A5, A0A0A3>>>>, IA1A2>>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4>>>>.VerifyA0A1A4GenericStatic>>>>, A0A1A4>>>, IA1>>>>>(); + A0A1A4>>>>>, IA1A2>>, IA2>.VerifyA0A1A4Static(); + A0A1A4>>>>>, IA1A2>>>, A0A0A1> v49 = new A0A1A4>>>>>, IA1A2>>>, A0A0A1>(); + v49.VerifyA0A1A4NotInlinedGeneric>>>>>, IA1A2>>>>(); + A0A1A4>>>>, IA1A2>> v50 = new A0A1A4>>>>, IA1A2>>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1.VerifyA0A0A0A1NotInlinedGenericStatic(); + A0A0A0A1>>>>>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1, IA1A5>.VerifyA0A0A0A1GenericStatic>>>>>(); + A0A0A0A1>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A0>>>>, A0A1A4>>>, IA1>>>>>>.VerifyA0A0A0A1Static(); + A0A0A0A1>>>>>, A0A0A0A0>>>>, A0A1A4>>>, IA1>>>>>> v51 = new A0A0A0A1>>>>>, A0A0A0A0>>>>, A0A1A4>>>, IA1>>>>>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric>>(); + A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>> v52 = new A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6>>>>>>.VerifyA0A3A6NotInlinedGenericStatic>>>>>>>(); + A0A3A6>>>>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A1>>>>>, IA1A2>>>>.VerifyA0A3A6GenericStatic>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A1>>>>>, IA1A2>>>>(); + A0A3A6>>>>>, IA1A2>>>>.VerifyA0A3A6Static(); + A0A3A6>>>>>> v53 = new A0A3A6>>>>>>(); + v53.VerifyA0A3A6NotInlinedGeneric(); + A0A3A6 v54 = new A0A3A6(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2>>>>, A0A1A4>>>, IA1>>>>>>.VerifyA0A0A1A2NotInlinedGenericStatic>>(); + A0A0A1A2>>>>, A0A1A4>>>, IA1>>>>>, A0A0A0A1>>>>>, IA1A2>>>>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2.VerifyA0A0A1A2GenericStatic>>>>, IA1A2>>>(); + A0A0A1A2>.VerifyA0A0A1A2Static(); + A0A0A1A2> v55 = new A0A0A1A2>(); + v55.VerifyA0A0A1A2NotInlinedGeneric>>>>, A0A1A4>>>, IA1>>>>>(); + A0A0A1A2>>>>>> v56 = new A0A0A1A2>>>>>>(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>>>>>>>.VerifyA0A1A2A3NotInlinedGenericStatic(); + A0A1A2A3, A0A0A1A2>>>>>>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>, A0A0A1>.VerifyA0A1A2A3GenericStatic(); + A0A1A2A3>>>>, A0A1A4>>>, IA1>>>>, A0A0>.VerifyA0A1A2A3Static(); + A0A1A2A3>, A0A3> v57 = new A0A1A2A3>, A0A3>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>(); + A0A1A2A3>>>>, IA1A2>>, A0A0A0>> v58 = new A0A1A2A3>>>>, IA1A2>>, A0A0A0>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0, A0A4>.VerifyA0A0A0A0A0NotInlinedGenericStatic>>>>>(); + A0A0A0A0A0>>>>, A0A1A4>>>, IA1>>>>>, A0A4>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0>>>>, IA1A2>>, A0A0A1A2>>>>>>>.VerifyA0A0A0A0A0GenericStatic>>>>>, IA1A2>>>>(); + A0A0A0A0A0>>>>, IA1A2>>, A0A0A0>>, A0A3>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>> v59 = new A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric>>>>>(); + A0A0A0A0A0, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>> v60 = new A0A0A0A0A0, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public interface IA2 + { + + void VerifyInterfaceIA2(); + + void VerifyInterfaceGenericIA2() + where K : new(); + } + + public class A0A1A2 : A0A1, IA2 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1A2NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1A2NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A1A2GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A1A2Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1A2NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1A2NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A1A2(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A1 next = new A0A0A1(); + next.RecurseA0A0A1((depth - 1)); + } + + public void CreateAllTypesA0A1A2() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0.VerifyA0NotInlinedGenericStatic>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2(); + A0A0.VerifyA0A0NotInlinedGenericStatic(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A1.VerifyA0A1NotInlinedGenericStatic(); + A0A1>>>>.VerifyA0A1NotInlinedStatic(); + A0A1>>>.VerifyA0A1GenericStatic>>>(); + A0A1>>>>.VerifyA0A1Static(); + A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A0>>>> v21 = new A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A0>>>>(); + v21.VerifyA0A1NotInlinedGeneric, IA1A2A5, A0A0A3>>>>>, IA1A2>>>(); + A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>>>> v22 = new A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>())); + i24.VerifyInterfaceGenericIA2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A0A0>>>.VerifyA0A0A0NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>(); + A0A0A0.VerifyA0A0A0NotInlinedStatic(); + A0A0A0.VerifyA0A0A0GenericStatic>>>>(); + A0A0A0, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>.VerifyA0A0A0Static(); + A0A0A0 v25 = new A0A0A0(); + v25.VerifyA0A0A0NotInlinedGeneric(); + A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>> v26 = new A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>())); + i28.VerifyInterfaceGenericIA2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A0>>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2(); + A0A1A2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A1A2NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>(); + A0A1A2, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>.VerifyA0A1A2GenericStatic(); + A0A1A2, IA1A2A5, A0A0A3>>>>>, IA1A2>>>.VerifyA0A1A2Static(); + A0A1A2, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>> v37 = new A0A1A2, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>>(); + v37.VerifyA0A1A2NotInlinedGeneric, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>(); + A0A1A2 v38 = new A0A1A2(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2())); + i40.VerifyInterfaceGenericIA2>>>>(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A0A0A0>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A0A0A0GenericStatic(); + A0A0A0A0, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A0>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0, IA1A2A5, A0A0A3>>>>>> v41 = new A0A0A0A0, IA1A2A5, A0A0A3>>>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric, IA1A2A5, A0A0A3>>>>>>>(); + A0A0A0A0 v42 = new A0A0A0A0(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0, IA1A2A5, A0A0A3>>>>>, IA1A2>>>())); + i44.VerifyInterfaceGenericIA2(); + A0A4.VerifyA0A4NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>>, IA1A2>>>(); + A0A4.VerifyA0A4NotInlinedStatic(); + A0A4.VerifyA0A4GenericStatic, IA1A2A5, A0A0A3>>>>>, IA1A2>>>(); + A0A4.VerifyA0A4Static(); + A0A4, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>> v45 = new A0A4, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + v45.VerifyA0A4NotInlinedGeneric(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3>.VerifyA0A0A3NotInlinedGenericStatic(); + A0A0A3, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>.VerifyA0A0A3GenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>>(); + A0A0A3.VerifyA0A0A3Static(); + A0A0A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>> v47 = new A0A0A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + v47.VerifyA0A0A3NotInlinedGeneric, IA1A2A5, A0A0A3>>>>>, IA1A2>>>(); + A0A0A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>> v48 = new A0A0A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4.VerifyA0A1A4NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>(); + A0A1A4>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4, IA1A2A5, A0A0A3>>>>>, IA1A2>>, A0A0A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A1A4GenericStatic(); + A0A1A4, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A1A4Static(); + A0A1A4, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>> v49 = new A0A1A4, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + v49.VerifyA0A1A4NotInlinedGeneric(); + A0A1A4 v50 = new A0A1A4(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>, IA2>.VerifyA0A0A0A1NotInlinedGenericStatic(); + A0A0A0A1, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A0>>>, A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A0A0A1GenericStatic, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A0>>>>(); + A0A0A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A3>.VerifyA0A0A0A1Static(); + A0A0A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A1, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>> v51 = new A0A0A0A1, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A1, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>> v52 = new A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A3A6NotInlinedGenericStatic>(); + A0A3A6, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6>.VerifyA0A3A6GenericStatic, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>(); + A0A3A6>.VerifyA0A3A6Static(); + A0A3A6, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>> v53 = new A0A3A6, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + v53.VerifyA0A3A6NotInlinedGeneric, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A3A6 v54 = new A0A3A6(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A0A1A2NotInlinedGenericStatic>(); + A0A0A1A2>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A0A1A2GenericStatic(); + A0A0A1A2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A0A1A2Static(); + A0A0A1A2> v55 = new A0A0A1A2>(); + v55.VerifyA0A0A1A2NotInlinedGeneric>(); + A0A0A1A2 v56 = new A0A0A1A2(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A1A2>.VerifyA0A1A2A3NotInlinedGenericStatic>(); + A0A1A2A3, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>, A0A4>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>.VerifyA0A1A2A3GenericStatic>(); + A0A1A2A3, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A0>>>>.VerifyA0A1A2A3Static(); + A0A1A2A3, A0A3A6> v57 = new A0A1A2A3, A0A3A6>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>(); + A0A1A2A3, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>> v58 = new A0A1A2A3, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A0>>>, A0A0A0A0A0, IA1A2A5, A0A0A3>>>>>, IA1A2>>>, A0A0A0>>>>.VerifyA0A0A0A0A0NotInlinedGenericStatic>(); + A0A0A0A0A0>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>, A0A0A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A0A0A0A0GenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A0A0A0A0.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0, A0A1, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>> v59 = new A0A0A0A0A0, A0A1, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric>(); + A0A0A0A0A0, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>> v60 = new A0A0A0A0A0, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public interface IA1 : IA2 + { + + void VerifyInterfaceIA1(); + + void VerifyInterfaceGenericIA1() + where K : new(); + } + + public interface IA1A2 : IA2 + where T0 : new() + { + } + + public class A0A0A0A0A0 : A0A0A0A0 + where T0 : new() + where T1 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0A0A0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T1 t2 = new T1(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0A0A0NotInlinedStatic() + { + T0 t0 = new T0(); + T1 t1 = new T1(); + } + + public static void VerifyA0A0A0A0A0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T1 t2 = new T1(); + T t3 = new T(); + } + + public static void VerifyA0A0A0A0A0Static() + { + T0 t0 = new T0(); + T1 t1 = new T1(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0A0A0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T1 t3 = new T1(); + T t4 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0A0A0NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + T1 t2 = new T1(); + } + + public void RecurseA0A0A0A0A0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A1A2A3>>>>, A0A1A4>>>, IA1>> next = new A0A1A2A3>>>>, A0A1A4>>>, IA1>>(); + next.RecurseA0A1A2A3((depth - 1)); + } + + public void CreateAllTypesA0A0A0A0A0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>>>(); + A0.VerifyA0NotInlinedGenericStatic(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric, A0A0A0A0A0>>>>>>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>>>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>>>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>>>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>>>>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2(); + A0A1>>>.VerifyA0A1NotInlinedGenericStatic>>>>(); + A0A1>>>>>.VerifyA0A1NotInlinedStatic(); + A0A1>>.VerifyA0A1GenericStatic>>>>>(); + A0A1, A0A0A0A0A0>>>>>>>.VerifyA0A1Static(); + A0A1>, A0A0>, A0A3A6>>>>>>> v21 = new A0A1>, A0A0>, A0A3A6>>>>>>>(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1())); + i24.VerifyInterfaceGenericIA2>>>(); + A0A0A0>.VerifyA0A0A0NotInlinedGenericStatic>>(); + A0A0A0>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>>>>.VerifyA0A0A0GenericStatic>>(); + A0A0A0.VerifyA0A0A0Static(); + A0A0A0 v25 = new A0A0A0(); + v25.VerifyA0A0A0NotInlinedGeneric(); + A0A0A0>> v26 = new A0A0A0>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>>>())); + i28.VerifyInterfaceGenericIA2>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>, A0A0>, A0A3A6>>>>>>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>>>(); + A0A1A2>.VerifyA0A1A2NotInlinedGenericStatic>, A0A0>, A0A3A6>>>>>>>(); + A0A1A2>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>>.VerifyA0A1A2GenericStatic>(); + A0A1A2>>>>.VerifyA0A1A2Static(); + A0A1A2>> v37 = new A0A1A2>>(); + v37.VerifyA0A1A2NotInlinedGeneric>>>>>(); + A0A1A2 v38 = new A0A1A2(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2())); + i40.VerifyInterfaceGenericIA2>, A0A0>, A0A3A6>>>>>>>(); + A0A0A0A0>>>>.VerifyA0A0A0A0NotInlinedGenericStatic(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>>>>.VerifyA0A0A0A0GenericStatic>, A0A0>, A0A3A6>>>>>>>(); + A0A0A0A0>>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0>>>>>> v41 = new A0A0A0A0>>>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>>(); + A0A0A0A0>>> v42 = new A0A0A0A0>>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>>())); + i44.VerifyInterfaceGenericIA2>>>>(); + A0A4>>>>>.VerifyA0A4NotInlinedGenericStatic>(); + A0A4>>>>>>.VerifyA0A4NotInlinedStatic(); + A0A4>>>>>.VerifyA0A4GenericStatic>>(); + A0A4>, A0A0>, A0A3A6>>>>>>>.VerifyA0A4Static(); + A0A4 v45 = new A0A4(); + v45.VerifyA0A4NotInlinedGeneric>>>(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3>>>.VerifyA0A0A3NotInlinedGenericStatic>>>>>(); + A0A0A3>>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>>.VerifyA0A0A3GenericStatic>>>>(); + A0A0A3>>>>>.VerifyA0A0A3Static(); + A0A0A3>>>> v47 = new A0A0A3>>>>(); + v47.VerifyA0A0A3NotInlinedGeneric>(); + A0A0A3> v48 = new A0A0A3>(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4>>>, A0A0A0A1>>.VerifyA0A1A4NotInlinedGenericStatic>>>>>(); + A0A1A4>>, A0A0A0>>>>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4>, A0A3A6>>>>>.VerifyA0A1A4GenericStatic>>(); + A0A1A4.VerifyA0A1A4Static(); + A0A1A4>, A0A0A0A1>> v49 = new A0A1A4>, A0A0A0A1>>(); + v49.VerifyA0A1A4NotInlinedGeneric>>>>>(); + A0A1A4>, A0A0A0A1>>, A0A0> v50 = new A0A1A4>, A0A0A0A1>>, A0A0>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1>>>, IA1>.VerifyA0A0A0A1NotInlinedGenericStatic>>>, IA1>>(); + A0A0A0A1>, A0A0A0A1>>, A0A0>, A0A0A0A0A0>>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1.VerifyA0A0A0A1GenericStatic>(); + A0A0A0A1, IA1A5>.VerifyA0A0A0A1Static(); + A0A0A0A1>, A0A0A3>> v51 = new A0A0A0A1>, A0A0A3>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric>>>>>(); + A0A0A0A1>>, A0A0A0A0>>>> v52 = new A0A0A0A1>>, A0A0A0A0>>>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6>.VerifyA0A3A6NotInlinedGenericStatic>>>>(); + A0A3A6>>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6.VerifyA0A3A6GenericStatic(); + A0A3A6>>>>>.VerifyA0A3A6Static(); + A0A3A6>, A0A0A0A1>>, A0A0>> v53 = new A0A3A6>, A0A0A0A1>>, A0A0>>(); + v53.VerifyA0A3A6NotInlinedGeneric>>>(); + A0A3A6>>>> v54 = new A0A3A6>>>>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2>>>>>.VerifyA0A0A1A2NotInlinedGenericStatic>>>(); + A0A0A1A2.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2.VerifyA0A0A1A2GenericStatic(); + A0A0A1A2.VerifyA0A0A1A2Static(); + A0A0A1A2 v55 = new A0A0A1A2(); + v55.VerifyA0A0A1A2NotInlinedGeneric>>, A0A0A0A0>>>>>(); + A0A0A1A2 v56 = new A0A0A1A2(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3, A0A0A0A1>>, A0A0A0A0>>>>>.VerifyA0A1A2A3NotInlinedGenericStatic(); + A0A1A2A3>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3>>>, A0A0A0A0>>>>.VerifyA0A1A2A3GenericStatic>>>, A0A0A0A0>>>>>(); + A0A1A2A3>.VerifyA0A1A2A3Static(); + A0A1A2A3>> v57 = new A0A1A2A3>>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>(); + A0A1A2A3>, A0A0A0A1>>, A0A0>> v58 = new A0A1A2A3>, A0A0A0A1>>, A0A0>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0>, A0A0A0A1>>, A0A0>>, A0A1A2A3>, A0A0A0A1>>, A0A0>>>.VerifyA0A0A0A0A0NotInlinedGenericStatic>>>>(); + A0A0A0A0A0, A0A3A6>>>>>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0>.VerifyA0A0A0A0A0GenericStatic>>(); + A0A0A0A0A0, A0A0A0A0>>>>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0>>>>, A0A0A0A0A0, A0A0A0A0>>>>> v59 = new A0A0A0A0A0>>>>, A0A0A0A0A0, A0A0A0A0>>>>>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric>>>>, A0A0A0A0A0, A0A0A0A0>>>>>>(); + A0A0A0A0A0>>>>, A0A0A0A0A0, A0A0A0A0>>>>>, A0> v60 = new A0A0A0A0A0>>>>, A0A0A0A0A0, A0A0A0A0>>>>>, A0>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public interface IA2A6 + where T0 : new() + { + } + + public class A0A0A1A2 : A0A0A1 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A1A2NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A1A2NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A0A1A2GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A0A1A2Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A1A2NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A1A2NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A0A1A2(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A3A6> next = new A0A3A6>(); + next.RecurseA0A3A6((depth - 1)); + } + + public void CreateAllTypesA0A0A1A2() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1, A0A0A3>>>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2(); + A0.VerifyA0NotInlinedGenericStatic>>>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>>>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2(); + A0A1, A0A0A0A0>>>.VerifyA0A1NotInlinedGenericStatic>>>>>(); + A0A1.VerifyA0A1NotInlinedStatic(); + A0A1>>.VerifyA0A1GenericStatic>>>(); + A0A1>>.VerifyA0A1Static(); + A0A1>>>> v21 = new A0A1>>>>(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1>>>>> v22 = new A0A1>>>>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1())); + i24.VerifyInterfaceGenericIA2>>>>(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>(); + A0A0A0.VerifyA0A0A0NotInlinedStatic(); + A0A0A0.VerifyA0A0A0GenericStatic(); + A0A0A0>.VerifyA0A0A0Static(); + A0A0A0>>>>> v25 = new A0A0A0>>>>>(); + v25.VerifyA0A0A0NotInlinedGeneric>>>>(); + A0A0A0>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>> v26 = new A0A0A0>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0())); + i28.VerifyInterfaceGenericIA2, A0A3A6>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric, A0A3A6>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2, A0A0A0A0>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic, A0A3A6>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>>>>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>(); + A0A1A2>.VerifyA0A1A2NotInlinedGenericStatic>(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2, A0A0A3>>>>>.VerifyA0A1A2GenericStatic, A0A0A3>>>>>(); + A0A1A2>>.VerifyA0A1A2Static(); + A0A1A2>>> v37 = new A0A1A2>>>(); + v37.VerifyA0A1A2NotInlinedGeneric>>(); + A0A1A2 v38 = new A0A1A2(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>())); + i40.VerifyInterfaceGenericIA2, A0A0A0A0>>>(); + A0A0A0A0>.VerifyA0A0A0A0NotInlinedGenericStatic>(); + A0A0A0A0>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>, A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>>>>>.VerifyA0A0A0A0GenericStatic>(); + A0A0A0A0.VerifyA0A0A0A0Static(); + A0A0A0A0, A0A0A0A0>>> v41 = new A0A0A0A0, A0A0A0A0>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric, A0A0A0A0>>>(); + A0A0A0A0>> v42 = new A0A0A0A0>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>>>())); + i44.VerifyInterfaceGenericIA2>(); + A0A4, A0A0A3>>>>>.VerifyA0A4NotInlinedGenericStatic>>(); + A0A4>.VerifyA0A4NotInlinedStatic(); + A0A4, A0A0A3>>>>>.VerifyA0A4GenericStatic>>>>(); + A0A4>>.VerifyA0A4Static(); + A0A4> v45 = new A0A4>(); + v45.VerifyA0A4NotInlinedGeneric>(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3>>>>>.VerifyA0A0A3NotInlinedGenericStatic>(); + A0A0A3>>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3.VerifyA0A0A3GenericStatic>(); + A0A0A3.VerifyA0A0A3Static(); + A0A0A3> v47 = new A0A0A3>(); + v47.VerifyA0A0A3NotInlinedGeneric, A0A0A3>>>>>(); + A0A0A3 v48 = new A0A0A3(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4>>>, A0A0>.VerifyA0A1A4NotInlinedGenericStatic>(); + A0A1A4>, A0A1A2>>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4, IA2A6>>, A0A1A4>>>>.VerifyA0A1A4GenericStatic>(); + A0A1A4, A0A0A3>>>>, IA1A5>.VerifyA0A1A4Static(); + A0A1A4, A0A0A0A0>>, A0> v49 = new A0A1A4, A0A0A0A0>>, A0>(); + v49.VerifyA0A1A4NotInlinedGeneric>>(); + A0A1A4, A0A3A6>>>> v50 = new A0A1A4, A0A3A6>>>>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1, A0>.VerifyA0A0A0A1NotInlinedGenericStatic(); + A0A0A0A1, A0A0A0A1, A0>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>.VerifyA0A0A0A1GenericStatic>>(); + A0A0A0A1>>>>.VerifyA0A0A0A1Static(); + A0A0A0A1>>>, A0A0A0A0>>>>> v51 = new A0A0A0A1>>>, A0A0A0A0>>>>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric>>>>(); + A0A0A0A1, A0A1A4, A0A3A6>>>>> v52 = new A0A0A0A1, A0A1A4, A0A3A6>>>>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6>>>>.VerifyA0A3A6NotInlinedGenericStatic(); + A0A3A6>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6.VerifyA0A3A6GenericStatic(); + A0A3A6, A0A3A6>>>>>.VerifyA0A3A6Static(); + A0A3A6>>>>> v53 = new A0A3A6>>>>>(); + v53.VerifyA0A3A6NotInlinedGeneric(); + A0A3A6>>>>> v54 = new A0A3A6>>>>>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2, A0A3A6>>>>>.VerifyA0A0A1A2NotInlinedGenericStatic, A0A1A4, A0A3A6>>>>>>(); + A0A0A1A2>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2.VerifyA0A0A1A2GenericStatic(); + A0A0A1A2>.VerifyA0A0A1A2Static(); + A0A0A1A2 v55 = new A0A0A1A2(); + v55.VerifyA0A0A1A2NotInlinedGeneric(); + A0A0A1A2> v56 = new A0A0A1A2>(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>>>>, A0A0A0A1, A0A1A4, A0A3A6>>>>>>.VerifyA0A1A2A3NotInlinedGenericStatic>(); + A0A1A2A3>>>>, A0A0A1>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3.VerifyA0A1A2A3GenericStatic>(); + A0A1A2A3, A0A1>.VerifyA0A1A2A3Static(); + A0A1A2A3, A0A1A4, A0A3A6>>>>> v57 = new A0A1A2A3, A0A1A4, A0A3A6>>>>>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>(); + A0A1A2A3, A0A0A0A0A0>>>>> v58 = new A0A1A2A3, A0A0A0A0A0>>>>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0>>.VerifyA0A0A0A0A0NotInlinedGenericStatic>(); + A0A0A0A0A0>, A0A0>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0>.VerifyA0A0A0A0A0GenericStatic>(); + A0A0A0A0A0, A0A3A6>>>>, A0A0A1>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0, A0> v59 = new A0A0A0A0A0, A0>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric>>>>>(); + A0A0A0A0A0>> v60 = new A0A0A0A0A0>>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public interface IA1A5 : IA2 + where T0 : new() + { + } + + public class A0A1A4 : A0A1 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1A4NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1A4NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A1A4GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A1A4Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1A4NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1A4NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A1A4(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A3>>>, A0A3A6>>>>>> next = new A0A0A3>>>, A0A3A6>>>>>>(); + next.RecurseA0A0A3((depth - 1)); + } + + public void CreateAllTypesA0A1A4() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>, A0A1>>>>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>, A0A1>>>>>, A0>>(); + A0.VerifyA0NotInlinedGenericStatic(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>>, A0A1>>>>, A0A3>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>, A0A1>>>>>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>, A0A1>>>>, A0A3>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>, A0A1>>>>, A0A3>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2(); + A0A1>.VerifyA0A1NotInlinedGenericStatic(); + A0A1.VerifyA0A1NotInlinedStatic(); + A0A1.VerifyA0A1GenericStatic>>, A0A1>>>>>>(); + A0A1.VerifyA0A1Static(); + A0A1 v21 = new A0A1(); + v21.VerifyA0A1NotInlinedGeneric>>, A0A1>>>>>>(); + A0A1>>, A0A1>>>>>> v22 = new A0A1>>, A0A1>>>>>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>>())); + i24.VerifyInterfaceGenericIA2(); + A0A0A0>>, A0A1>>>>>>.VerifyA0A0A0NotInlinedGenericStatic>>>>>>(); + A0A0A0>>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>, A0A1>>>>, A0A3>>.VerifyA0A0A0GenericStatic>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>(); + A0A0A0.VerifyA0A0A0Static(); + A0A0A0> v25 = new A0A0A0>(); + v25.VerifyA0A0A0NotInlinedGeneric(); + A0A0A0> v26 = new A0A0A0>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>>, A0A1>>>>, A0A3>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>())); + i28.VerifyInterfaceGenericIA2>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>>(); + A0A3.VerifyA0A3NotInlinedGenericStatic(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>, A0A1>>>>>, A0>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>, A0A1>>>>>>(); + A0A1A2.VerifyA0A1A2NotInlinedGenericStatic(); + A0A1A2>>, A0A1>>>>>, A0A3A6>>>>>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>.VerifyA0A1A2GenericStatic>>, A0A1>>>>>, A0>>(); + A0A1A2>>, A0A1>>>>, A0A3>>.VerifyA0A1A2Static(); + A0A1A2>>, A0A1>>>>>, A0>> v37 = new A0A1A2>>, A0A1>>>>>, A0>>(); + v37.VerifyA0A1A2NotInlinedGeneric>>>>(); + A0A1A2>>, A0A1>>>>>, A0>> v38 = new A0A1A2>>, A0A1>>>>>, A0>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>, A0A1>>>>>>())); + i40.VerifyInterfaceGenericIA2>(); + A0A0A0A0>>>>>>.VerifyA0A0A0A0NotInlinedGenericStatic(); + A0A0A0A0>>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0.VerifyA0A0A0A0GenericStatic>>>>>>(); + A0A0A0A0>>>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0 v41 = new A0A0A0A0(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>>>>>(); + A0A0A0A0 v42 = new A0A0A0A0(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0())); + i44.VerifyInterfaceGenericIA2>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>>(); + A0A4>.VerifyA0A4NotInlinedGenericStatic>>>>(); + A0A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>>.VerifyA0A4NotInlinedStatic(); + A0A4.VerifyA0A4GenericStatic>>, A0A1>>>>>>>(); + A0A4.VerifyA0A4Static(); + A0A4>>>> v45 = new A0A4>>>>(); + v45.VerifyA0A4NotInlinedGeneric>(); + A0A4> v46 = new A0A4>(); + v46.VerifyA0A4NotInlined(); + A0A0A3>>, A0A1>>>>>, A0>>.VerifyA0A0A3NotInlinedGenericStatic>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>>(); + A0A0A3.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>.VerifyA0A0A3GenericStatic>>, A0A1>>>>, A0A3>>(); + A0A0A3>>, A0A1>>>>, A0A3>>.VerifyA0A0A3Static(); + A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>> v47 = new A0A0A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>>(); + v47.VerifyA0A0A3NotInlinedGeneric(); + A0A0A3 v48 = new A0A0A3(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4>>>, A0A3A6>.VerifyA0A1A4NotInlinedGenericStatic(); + A0A1A4>>>, IA1A5>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, IA2A6>>, A0A1A4>>>>.VerifyA0A1A4GenericStatic>(); + A0A1A4>>, A0A1>>>>>>, A0A0A0A1>>, A0A1>>>>>, A0A3A6>>>>>>.VerifyA0A1A4Static(); + A0A1A4>>, A0A1>>>>>, A0>, A0A3> v49 = new A0A1A4>>, A0A1>>>>>, A0>, A0A3>(); + v49.VerifyA0A1A4NotInlinedGeneric>>, A0A1>>>>>>>(); + A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0> v50 = new A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1, A0A0A1>.VerifyA0A0A0A1NotInlinedGenericStatic>(); + A0A0A0A1>>, A0A1>>>>>>, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>>, A0A1>>>>>>, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>, A0A1A2A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>.VerifyA0A0A0A1GenericStatic>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>(); + A0A0A0A1.VerifyA0A0A0A1Static(); + A0A0A0A1>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>, IA1> v51 = new A0A0A0A1>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>, IA1>(); + v51.VerifyA0A0A0A1NotInlinedGeneric(); + A0A0A0A1>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>> v52 = new A0A0A0A1>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>.VerifyA0A3A6NotInlinedGenericStatic>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>>(); + A0A3A6>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6.VerifyA0A3A6GenericStatic>>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>>(); + A0A3A6>>.VerifyA0A3A6Static(); + A0A3A6 v53 = new A0A3A6(); + v53.VerifyA0A3A6NotInlinedGeneric(); + A0A3A6>> v54 = new A0A3A6>>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2>>.VerifyA0A0A1A2NotInlinedGenericStatic(); + A0A0A1A2>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>.VerifyA0A0A1A2GenericStatic>>, A0A1>>>>>>>(); + A0A0A1A2>>.VerifyA0A0A1A2Static(); + A0A0A1A2>>>> v55 = new A0A0A1A2>>>>(); + v55.VerifyA0A0A1A2NotInlinedGeneric>>(); + A0A0A1A2 v56 = new A0A0A1A2(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>>, A0A1>>>>>>>.VerifyA0A1A2A3NotInlinedGenericStatic(); + A0A1A2A3, A0A0A1A2>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3>>, A0A1>>>>>>, A0A3>.VerifyA0A1A2A3GenericStatic(); + A0A1A2A3>>, A0A1>>>>>>, A0A3>, A0A0A0A0A0>>, A0A1>>>>>, A0>>.VerifyA0A1A2A3Static(); + A0A1A2A3>>, A0A0A0A0A0>>, A0A1>>>>>, A0>> v57 = new A0A1A2A3>>, A0A0A0A0A0>>, A0A1>>>>>, A0>>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>(); + A0A1A2A3, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>> v58 = new A0A1A2A3, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0, A0A3A6>>>.VerifyA0A0A0A0A0NotInlinedGenericStatic>>>>(); + A0A0A0A0A0, A0A0A1>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0, A0A4>>.VerifyA0A0A0A0A0GenericStatic>>, A0A1>>>>>>>(); + A0A0A0A0A0.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>, A0A0A1> v59 = new A0A0A0A0A0, A0A1A4>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0>>, A0A0A1>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric>>>>(); + A0A0A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0> v60 = new A0A0A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>>, A0A0A0A0>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public class A0A4 : A0 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A4NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A4NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A4GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A4Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A4NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A4NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A4(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A0A0>>>, A0A3A6>>>>> next = new A0A0A0A0>>>, A0A3A6>>>>>(); + next.RecurseA0A0A0A0((depth - 1)); + } + + public void CreateAllTypesA0A4() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2(); + A0.VerifyA0NotInlinedGenericStatic(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>, A0A1A4>>>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic, A0A0A1>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>(); + A0A1.VerifyA0A1NotInlinedGenericStatic(); + A0A1>>.VerifyA0A1NotInlinedStatic(); + A0A1>.VerifyA0A1GenericStatic>>>>(); + A0A1>>>.VerifyA0A1Static(); + A0A1>>>> v21 = new A0A1>>>>(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1>> v22 = new A0A1>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>>())); + i24.VerifyInterfaceGenericIA2(); + A0A0A0.VerifyA0A0A0NotInlinedGenericStatic(); + A0A0A0>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0, A0A0A1>>>.VerifyA0A0A0GenericStatic(); + A0A0A0>>>>.VerifyA0A0A0Static(); + A0A0A0>>>> v25 = new A0A0A0>>>>(); + v25.VerifyA0A0A0NotInlinedGeneric>>(); + A0A0A0>>>>> v26 = new A0A0A0>>>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>>())); + i28.VerifyInterfaceGenericIA2(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic, A0A0A1>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic, A0A0A1>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>>(); + A0A1A2.VerifyA0A1A2NotInlinedGenericStatic>>>(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>.VerifyA0A1A2GenericStatic>(); + A0A1A2>>>.VerifyA0A1A2Static(); + A0A1A2>>> v37 = new A0A1A2>>>(); + v37.VerifyA0A1A2NotInlinedGeneric(); + A0A1A2>>> v38 = new A0A1A2>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>>>>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>>())); + i40.VerifyInterfaceGenericIA2(); + A0A0A0A0>>>.VerifyA0A0A0A0NotInlinedGenericStatic>>>(); + A0A0A0A0, A0A0A1>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0, A0A0A1>>.VerifyA0A0A0A0GenericStatic, A0A0A1>>>(); + A0A0A0A0>.VerifyA0A0A0A0Static(); + A0A0A0A0 v41 = new A0A0A0A0(); + v41.VerifyA0A0A0A0NotInlinedGeneric>(); + A0A0A0A0 v42 = new A0A0A0A0(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>())); + i44.VerifyInterfaceGenericIA2>>>(); + A0A4>.VerifyA0A4NotInlinedGenericStatic>>>(); + A0A4, A0A0A1>>.VerifyA0A4NotInlinedStatic(); + A0A4.VerifyA0A4GenericStatic>>>>(); + A0A4>>>.VerifyA0A4Static(); + A0A4>>>> v45 = new A0A4>>>>(); + v45.VerifyA0A4NotInlinedGeneric, A0A0A1>>>(); + A0A4 v46 = new A0A4(); + v46.VerifyA0A4NotInlined(); + A0A0A3.VerifyA0A0A3NotInlinedGenericStatic>>>>(); + A0A0A3>>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>>>>.VerifyA0A0A3GenericStatic(); + A0A0A3>>>>.VerifyA0A0A3Static(); + A0A0A3 v47 = new A0A0A3(); + v47.VerifyA0A0A3NotInlinedGeneric>>>>(); + A0A0A3> v48 = new A0A0A3>(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4>, A0A3A6>>>.VerifyA0A1A4NotInlinedGenericStatic>>>(); + A0A1A4>>>, A0A3>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4>, A0>.VerifyA0A1A4GenericStatic>>>>(); + A0A1A4, A0A0A3>>>>.VerifyA0A1A4Static(); + A0A1A4>>>, IA2A6>>, A0A1A4>>>> v49 = new A0A1A4>>>, IA2A6>>, A0A1A4>>>>(); + v49.VerifyA0A1A4NotInlinedGeneric>>>, IA2A6>>, A0A1A4>>>>>(); + A0A1A4, A0A0A1>>, A0A0A0A1> v50 = new A0A1A4, A0A0A1>>, A0A0A0A1>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1>>>, A0A1A4, A0A0A1>>, A0A0A0A1>>.VerifyA0A0A0A1NotInlinedGenericStatic(); + A0A0A0A1, A0A4>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>>>, IA2A6>>, A0A1A4>>>>.VerifyA0A0A0A1GenericStatic, A0A0A1>>>(); + A0A0A0A1, A0A0A1>>, IA2A6>>, A0A1A4>>>>.VerifyA0A0A0A1Static(); + A0A0A0A1, A0A0A1>>, IA2A6>>, A0A1A4>>>>, A0A0A0>>> v51 = new A0A0A0A1, A0A0A1>>, IA2A6>>, A0A1A4>>>>, A0A0A0>>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric>(); + A0A0A0A1>>> v52 = new A0A0A0A1>>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6>>.VerifyA0A3A6NotInlinedGenericStatic>>>(); + A0A3A6.VerifyA0A3A6NotInlinedStatic(); + A0A3A6>>>.VerifyA0A3A6GenericStatic>>(); + A0A3A6>>>>.VerifyA0A3A6Static(); + A0A3A6>>>> v53 = new A0A3A6>>>>(); + v53.VerifyA0A3A6NotInlinedGeneric>>(); + A0A3A6>>>> v54 = new A0A3A6>>>>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2.VerifyA0A0A1A2NotInlinedGenericStatic(); + A0A0A1A2>>>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2>.VerifyA0A0A1A2GenericStatic>>>>(); + A0A0A1A2>>>.VerifyA0A0A1A2Static(); + A0A0A1A2 v55 = new A0A0A1A2(); + v55.VerifyA0A0A1A2NotInlinedGeneric(); + A0A0A1A2 v56 = new A0A0A1A2(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>>>, A0A1A4, A0A0A1>>, A0A0A0A1>>.VerifyA0A1A2A3NotInlinedGenericStatic>>>>(); + A0A1A2A3, A0A0A0A0>>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3, A0A0A1>>, A0A0A0A1>, A0A0A0A0>>>.VerifyA0A1A2A3GenericStatic>>(); + A0A1A2A3, A0A1A2A3, A0A0A1>>, A0A0A0A1>, A0A0A0A0>>>>.VerifyA0A1A2A3Static(); + A0A1A2A3>>>, A0A4> v57 = new A0A1A2A3>>>, A0A4>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>>>>(); + A0A1A2A3, A0A1A2A3>>>, A0A4>> v58 = new A0A1A2A3, A0A1A2A3>>>, A0A4>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0>>, A0A1>>>>.VerifyA0A0A0A0A0NotInlinedGenericStatic>>>>(); + A0A0A0A0A0, A0A0A1>>, A0A0A0A1>, A0A0A0>>>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0, A0A0A1>>, A0A0A0A1>, A0A0A0>>>>.VerifyA0A0A0A0A0GenericStatic(); + A0A0A0A0A0.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0, A0A0A0>>> v59 = new A0A0A0A0A0, A0A0A0>>>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric, A0A0A0>>>>(); + A0A0A0A0A0>>, A0A1>>>> v60 = new A0A0A0A0A0>>, A0A1>>>>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public class A0A0A0A0 : A0A0A0, IA2 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0A0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0A0NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A0A0A0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A0A0A0Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0A0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0A0NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A0A0A0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A1A2>>>> next = new A0A1A2>>>>(); + next.RecurseA0A1A2((depth - 1)); + } + + public void CreateAllTypesA0A0A0A0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>(); + A0.VerifyA0NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>, A0A1A4>>>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A1>.VerifyA0A1NotInlinedGenericStatic(); + A0A1.VerifyA0A1NotInlinedStatic(); + A0A1.VerifyA0A1GenericStatic>(); + A0A1, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A1Static(); + A0A1 v21 = new A0A1(); + v21.VerifyA0A1NotInlinedGeneric>(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>())); + i24.VerifyInterfaceGenericIA2, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>(); + A0A0A0>.VerifyA0A0A0NotInlinedGenericStatic>(); + A0A0A0, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>.VerifyA0A0A0GenericStatic>(); + A0A0A0>>.VerifyA0A0A0Static(); + A0A0A0> v25 = new A0A0A0>(); + v25.VerifyA0A0A0NotInlinedGeneric>(); + A0A0A0 v26 = new A0A0A0(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0())); + i28.VerifyInterfaceGenericIA2>(); + A0A3.VerifyA0A3NotInlinedGenericStatic>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>(); + A0A1A2, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>.VerifyA0A1A2NotInlinedGenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2.VerifyA0A1A2GenericStatic, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>(); + A0A1A2>>.VerifyA0A1A2Static(); + A0A1A2, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>> v37 = new A0A1A2, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>(); + v37.VerifyA0A1A2NotInlinedGeneric>(); + A0A1A2> v38 = new A0A1A2>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>())); + i40.VerifyInterfaceGenericIA2, IA1A2A5, A0A0A3>>>>>, IA1A2>>>>(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedGenericStatic>(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>.VerifyA0A0A0A0GenericStatic>(); + A0A0A0A0>>.VerifyA0A0A0A0Static(); + A0A0A0A0 v41 = new A0A0A0A0(); + v41.VerifyA0A0A0A0NotInlinedGeneric>(); + A0A0A0A0>> v42 = new A0A0A0A0>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0())); + i44.VerifyInterfaceGenericIA2>(); + A0A4, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>.VerifyA0A4NotInlinedGenericStatic>(); + A0A4>.VerifyA0A4NotInlinedStatic(); + A0A4, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>.VerifyA0A4GenericStatic>(); + A0A4.VerifyA0A4Static(); + A0A4> v45 = new A0A4>(); + v45.VerifyA0A4NotInlinedGeneric(); + A0A4> v46 = new A0A4>(); + v46.VerifyA0A4NotInlined(); + A0A0A3>.VerifyA0A0A3NotInlinedGenericStatic>>(); + A0A0A3.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>.VerifyA0A0A3GenericStatic>>(); + A0A0A3.VerifyA0A0A3Static(); + A0A0A3> v47 = new A0A0A3>(); + v47.VerifyA0A0A3NotInlinedGeneric(); + A0A0A3 v48 = new A0A0A3(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4, A0A4>>.VerifyA0A1A4NotInlinedGenericStatic>(); + A0A1A4, IA1>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>, A0>.VerifyA0A1A4GenericStatic, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>(); + A0A1A4, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>, A0A0A0A0A0, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>>.VerifyA0A1A4Static(); + A0A1A4, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>> v49 = new A0A1A4, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>(); + v49.VerifyA0A1A4NotInlinedGeneric(); + A0A1A4, A0A0A1> v50 = new A0A1A4, A0A0A1>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1.VerifyA0A0A0A1NotInlinedGenericStatic(); + A0A0A0A1.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>>.VerifyA0A0A0A1GenericStatic(); + A0A0A0A1, A0>.VerifyA0A0A0A1Static(); + A0A0A0A1, A0A0A1>, IA1> v51 = new A0A0A0A1, A0A0A1>, IA1>(); + v51.VerifyA0A0A0A1NotInlinedGeneric, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>>(); + A0A0A0A1 v52 = new A0A0A0A1(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6.VerifyA0A3A6NotInlinedGenericStatic>(); + A0A3A6>>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6>>.VerifyA0A3A6GenericStatic(); + A0A3A6>.VerifyA0A3A6Static(); + A0A3A6 v53 = new A0A3A6(); + v53.VerifyA0A3A6NotInlinedGeneric(); + A0A3A6>> v54 = new A0A3A6>>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2.VerifyA0A0A1A2NotInlinedGenericStatic>(); + A0A0A1A2>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2>>.VerifyA0A0A1A2GenericStatic>(); + A0A0A1A2>>.VerifyA0A0A1A2Static(); + A0A0A1A2> v55 = new A0A0A1A2>(); + v55.VerifyA0A0A1A2NotInlinedGeneric, A0A0A1>>(); + A0A0A1A2>> v56 = new A0A0A1A2>>(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3, A0A3>.VerifyA0A1A2A3NotInlinedGenericStatic(); + A0A1A2A3, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>, A0A1>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3, A0A0A0A1, A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>>>>>, A0A0A0A1>.VerifyA0A1A2A3GenericStatic(); + A0A1A2A3>, A0A1A4, A0A0A1>>.VerifyA0A1A2A3Static(); + A0A1A2A3>>, A0A1A2>> v57 = new A0A1A2A3>>, A0A1A2>>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>(); + A0A1A2A3, A0A0A1>> v58 = new A0A1A2A3, A0A0A1>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0, A0A0A3>.VerifyA0A0A0A0A0NotInlinedGenericStatic>>(); + A0A0A0A0A0, A0A1A2A3, A0A0A1>>>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0>>, A0A1A4, A0A0A1>>.VerifyA0A0A0A0A0GenericStatic, A0A0A1>>>(); + A0A0A0A0A0>>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0> v59 = new A0A0A0A0A0>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric>>>(); + A0A0A0A0A0>>> v60 = new A0A0A0A0A0>>>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public class A0A1A2A3 : A0A1A2 + where T0 : new() + where T1 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1A2A3NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T1 t2 = new T1(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1A2A3NotInlinedStatic() + { + T0 t0 = new T0(); + T1 t1 = new T1(); + } + + public static void VerifyA0A1A2A3GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T1 t2 = new T1(); + T t3 = new T(); + } + + public static void VerifyA0A1A2A3Static() + { + T0 t0 = new T0(); + T1 t1 = new T1(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1A2A3NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T1 t3 = new T1(); + T t4 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1A2A3NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + T1 t2 = new T1(); + } + + public void RecurseA0A1A2A3(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A1A2>>>, A0A3A6>>>>> next = new A0A0A1A2>>>, A0A3A6>>>>>(); + next.RecurseA0A0A1A2((depth - 1)); + } + + public void CreateAllTypesA0A1A2A3() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>>>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2, A0A1A4, A0A3A6>>>>>>(); + A0.VerifyA0NotInlinedGenericStatic, A0A1A4, A0A3A6>>>>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>>>>>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric, A0A1A4, A0A3A6>>>>>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>>>>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2(); + A0A1, A0A1A4, A0A3A6>>>>>>.VerifyA0A1NotInlinedGenericStatic(); + A0A1>>>>>.VerifyA0A1NotInlinedStatic(); + A0A1>>>>>.VerifyA0A1GenericStatic, A0A3A6>>>>>(); + A0A1.VerifyA0A1Static(); + A0A1> v21 = new A0A1>(); + v21.VerifyA0A1NotInlinedGeneric>(); + A0A1> v22 = new A0A1>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1())); + i24.VerifyInterfaceGenericIA2>>(); + A0A0A0>.VerifyA0A0A0NotInlinedGenericStatic, A0A0A0A0A0>>>>>>(); + A0A0A0>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0, A0A1A4, A0A3A6>>>>>>.VerifyA0A0A0GenericStatic>>>(); + A0A0A0>.VerifyA0A0A0Static(); + A0A0A0> v25 = new A0A0A0>(); + v25.VerifyA0A0A0NotInlinedGeneric>>(); + A0A0A0 v26 = new A0A0A0(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0, A0A0A0A0A0>>>>>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0, A0A0A0A0A0>>>>>>())); + i28.VerifyInterfaceGenericIA2(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>>>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic, A0A3A6>>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic, A0A1A4, A0A3A6>>>>>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>>>>>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>(); + A0A1A2, A0A1A4, A0A3A6>>>>>>.VerifyA0A1A2NotInlinedGenericStatic>>>>>>(); + A0A1A2>>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2.VerifyA0A1A2GenericStatic(); + A0A1A2>.VerifyA0A1A2Static(); + A0A1A2>> v37 = new A0A1A2>>(); + v37.VerifyA0A1A2NotInlinedGeneric>>>(); + A0A1A2, A0A3A6>>>>> v38 = new A0A1A2, A0A3A6>>>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>())); + i40.VerifyInterfaceGenericIA2, A0A1A4, A0A3A6>>>>>>(); + A0A0A0A0>.VerifyA0A0A0A0NotInlinedGenericStatic>>>(); + A0A0A0A0>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0, A0A0A0A0A0>>>>>>>.VerifyA0A0A0A0GenericStatic, A0A0A0A0A0>>>>>>>(); + A0A0A0A0, A0A0A0A0A0>>>>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0, A0A0A0A0A0>>>>>>> v41 = new A0A0A0A0, A0A0A0A0A0>>>>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>>>>>(); + A0A0A0A0, A0A0A0A0A0>>>>>>> v42 = new A0A0A0A0, A0A0A0A0A0>>>>>>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>>())); + i44.VerifyInterfaceGenericIA2>>(); + A0A4>>.VerifyA0A4NotInlinedGenericStatic, A0A0A0A0A0>>>>>>>(); + A0A4.VerifyA0A4NotInlinedStatic(); + A0A4.VerifyA0A4GenericStatic(); + A0A4, A0A0A0A0A0>>>>>>>.VerifyA0A4Static(); + A0A4>>> v45 = new A0A4>>>(); + v45.VerifyA0A4NotInlinedGeneric>>>>(); + A0A4> v46 = new A0A4>(); + v46.VerifyA0A4NotInlined(); + A0A0A3>>>>>>.VerifyA0A0A3NotInlinedGenericStatic>(); + A0A0A3>>>>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>>.VerifyA0A0A3GenericStatic>>>>(); + A0A0A3, A0A3A6>>>>>.VerifyA0A0A3Static(); + A0A0A3>>>> v47 = new A0A0A3>>>>(); + v47.VerifyA0A0A3NotInlinedGeneric, A0A1A4, A0A3A6>>>>>>(); + A0A0A3>> v48 = new A0A0A3>>(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4>>>>>, A0A0A0, A0A0A0A0A0>>>>>>>.VerifyA0A1A4NotInlinedGenericStatic>>(); + A0A1A4, A0A0A0A0A0>>>>>>, IA1A2A5, A0A0A3>>>>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4>>>, A0A0A0A0>>>>.VerifyA0A1A4GenericStatic>>>>>>(); + A0A1A4>>>>>, A0A0A0A0>>>>.VerifyA0A1A4Static(); + A0A1A4>, A0A0> v49 = new A0A1A4>, A0A0>(); + v49.VerifyA0A1A4NotInlinedGeneric(); + A0A1A4>, A0A0>, A0A3A6>>>>>> v50 = new A0A1A4>, A0A0>, A0A3A6>>>>>>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1>>>.VerifyA0A0A0A1NotInlinedGenericStatic, A0A0A0A0A0>>>>>>(); + A0A0A0A1>, A0A0A3>>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1, A0A0A0A0A0>>>>>, A0A0A0A0>>>>.VerifyA0A0A0A1GenericStatic, A0A0A0A0A0>>>>>>>(); + A0A0A0A1>>, A0A0A3>>>.VerifyA0A0A0A1Static(); + A0A0A0A1>>>>>, A0A3A6>>>>>> v51 = new A0A0A0A1>>>>>, A0A3A6>>>>>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric, A0A0A0A0A0>>>>>>>(); + A0A0A0A1> v52 = new A0A0A0A1>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6>>>.VerifyA0A3A6NotInlinedGenericStatic>>(); + A0A3A6.VerifyA0A3A6NotInlinedStatic(); + A0A3A6>, A0A0>, A0A3A6>>>>>>>.VerifyA0A3A6GenericStatic(); + A0A3A6>, A0A0>, A0A3A6>>>>>>>>.VerifyA0A3A6Static(); + A0A3A6>> v53 = new A0A3A6>>(); + v53.VerifyA0A3A6NotInlinedGeneric, A0A0A0A0A0>>>>>>>(); + A0A3A6>>>> v54 = new A0A3A6>>>>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2>>.VerifyA0A0A1A2NotInlinedGenericStatic>>>>>(); + A0A0A1A2.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2>>.VerifyA0A0A1A2GenericStatic>>(); + A0A0A1A2.VerifyA0A0A1A2Static(); + A0A0A1A2 v55 = new A0A0A1A2(); + v55.VerifyA0A0A1A2NotInlinedGeneric>>(); + A0A0A1A2>>>> v56 = new A0A0A1A2>>>>(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>>, A0A0A1A2>>>>>.VerifyA0A1A2A3NotInlinedGenericStatic(); + A0A1A2A3>, A0A1A2A3>>, A0A0A1A2>>>>>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3, A0A1A4>, A0A0>, A0A3A6>>>>>>>.VerifyA0A1A2A3GenericStatic(); + A0A1A2A3>>, A0A1A2>>.VerifyA0A1A2A3Static(); + A0A1A2A3>>, A0A0A0A0A0>>> v57 = new A0A1A2A3>>, A0A0A0A0A0>>>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>>(); + A0A1A2A3>>>> v58 = new A0A1A2A3>>>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0, A0A0A1A2>>>>>.VerifyA0A0A0A0A0NotInlinedGenericStatic>>>>>(); + A0A0A0A0A0>>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0>, A0>.VerifyA0A0A0A0A0GenericStatic>, A0A0>, A0A3A6>>>>>>>(); + A0A0A0A0A0>>>>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0>>>>, A0A0A0A1>> v59 = new A0A0A0A0A0>>>>, A0A0A0A1>>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric>>(); + A0A0A0A0A0>> v60 = new A0A0A0A0A0>>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public class A0A1 : A0, IA2 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A1NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A1GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A1Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A1NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A1(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0 next = new A0A0(); + next.RecurseA0A0((depth - 1)); + } + + public void CreateAllTypesA0A1() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>>>>, IA1A2>>>(); + A0.VerifyA0NotInlinedGenericStatic>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>>>>, A0A1A4>>>, IA1>>>>>>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>>>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>>>, A0A1A4>>>, IA1>>>>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic>>>>, A0A1A4>>>, IA1>>>>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>>>>>>>(); + A0A1.VerifyA0A1NotInlinedGenericStatic>(); + A0A1>.VerifyA0A1NotInlinedStatic(); + A0A1>>>>>.VerifyA0A1GenericStatic>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>(); + A0A1>.VerifyA0A1Static(); + A0A1 v21 = new A0A1(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>>>, IA1A2>>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1())); + i24.VerifyInterfaceGenericIA2>>(); + A0A0A0>>>>, A0A1A4>>>, IA1>>>>>>.VerifyA0A0A0NotInlinedGenericStatic>>>>>, IA1A2>>>>(); + A0A0A0>>>>, A0A1A4>>>, IA1>>>>>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0.VerifyA0A0A0GenericStatic, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>(); + A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>.VerifyA0A0A0Static(); + A0A0A0> v25 = new A0A0A0>(); + v25.VerifyA0A0A0NotInlinedGeneric>(); + A0A0A0> v26 = new A0A0A0>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>>>>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>())); + i28.VerifyInterfaceGenericIA2(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>>>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>>, IA1A2>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2(); + A0A1A2>>>>>.VerifyA0A1A2NotInlinedGenericStatic>(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>>>, A0A1A4>>>, IA1>>>>>>.VerifyA0A1A2GenericStatic>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>(); + A0A1A2>.VerifyA0A1A2Static(); + A0A1A2>>>>>>> v37 = new A0A1A2>>>>>>>(); + v37.VerifyA0A1A2NotInlinedGeneric(); + A0A1A2>>>>>>> v38 = new A0A1A2>>>>>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2())); + i40.VerifyInterfaceGenericIA2(); + A0A0A0A0>.VerifyA0A0A0A0NotInlinedGenericStatic>>>>>>>(); + A0A0A0A0>>>>, IA1A2>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>>>, IA1A2>>>>.VerifyA0A0A0A0GenericStatic>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>(); + A0A0A0A0>>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0> v41 = new A0A0A0A0>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>>>>>>(); + A0A0A0A0>>>>>>> v42 = new A0A0A0A0>>>>>>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0())); + i44.VerifyInterfaceGenericIA2>(); + A0A4.VerifyA0A4NotInlinedGenericStatic>(); + A0A4.VerifyA0A4NotInlinedStatic(); + A0A4>>>>, IA1A2>>>.VerifyA0A4GenericStatic>(); + A0A4>.VerifyA0A4Static(); + A0A4>>>>> v45 = new A0A4>>>>>(); + v45.VerifyA0A4NotInlinedGeneric(); + A0A4>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>> v46 = new A0A4>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>(); + v46.VerifyA0A4NotInlined(); + A0A0A3>>.VerifyA0A0A3NotInlinedGenericStatic>>>(); + A0A0A3, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>>.VerifyA0A0A3GenericStatic, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>(); + A0A0A3, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>>>.VerifyA0A0A3Static(); + A0A0A3>>>>>>> v47 = new A0A0A3>>>>>>>(); + v47.VerifyA0A0A3NotInlinedGeneric>>>>, IA1A2>>, A0A0A0>>>(); + A0A0A3>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>> v48 = new A0A0A3>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4>>.VerifyA0A1A4NotInlinedGenericStatic(); + A0A1A4, IA1>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>, IA2>.VerifyA0A1A4GenericStatic>>(); + A0A1A4>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>, IA2>, A0A0>.VerifyA0A1A4Static(); + A0A1A4> v49 = new A0A1A4>(); + v49.VerifyA0A1A4NotInlinedGeneric>>(); + A0A1A4>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>, A0A0A0>> v50 = new A0A1A4>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>, A0A0A0>>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1>>.VerifyA0A0A0A1NotInlinedGenericStatic>>(); + A0A0A0A1, IA1A2>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>, A0A0>.VerifyA0A0A0A1GenericStatic>, A0A0>>(); + A0A0A0A1>.VerifyA0A0A0A1Static(); + A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>> v51 = new A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>, A0A0A0>>>(); + A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>> v52 = new A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>.VerifyA0A3A6NotInlinedGenericStatic(); + A0A3A6, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6.VerifyA0A3A6GenericStatic>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>(); + A0A3A6.VerifyA0A3A6Static(); + A0A3A6>> v53 = new A0A3A6>>(); + v53.VerifyA0A3A6NotInlinedGeneric>>>>>>>(); + A0A3A6> v54 = new A0A3A6>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2.VerifyA0A0A1A2NotInlinedGenericStatic>(); + A0A0A1A2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2.VerifyA0A0A1A2GenericStatic>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>(); + A0A0A1A2>>>>, IA1A2>>, A0A0A0>>>.VerifyA0A0A1A2Static(); + A0A0A1A2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>> v55 = new A0A0A1A2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>(); + v55.VerifyA0A0A1A2NotInlinedGeneric(); + A0A0A1A2 v56 = new A0A0A1A2(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>, A0A3>.VerifyA0A1A2A3NotInlinedGenericStatic>>(); + A0A1A2A3, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>, A0A0A0>>, A0A4>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>.VerifyA0A1A2A3GenericStatic(); + A0A1A2A3, A0A0A0A0A0, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>.VerifyA0A1A2A3Static(); + A0A1A2A3, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A1> v57 = new A0A1A2A3, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A1>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>(); + A0A1A2A3>, A0A0A1> v58 = new A0A1A2A3>, A0A0A1>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0, A0A0A0A0A0, A0A0A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0>.VerifyA0A0A0A0A0NotInlinedGenericStatic>>(); + A0A0A0A0A0>, A0A0>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0, A0A0>.VerifyA0A0A0A0A0GenericStatic(); + A0A0A0A0A0>>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0, A0> v59 = new A0A0A0A0A0, A0>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>, A0A0A0>>>(); + A0A0A0A0A0> v60 = new A0A0A0A0A0>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public class Program + { + + public static int Main(string[] args) + { + A0 v0 = new A0(); + v0.CreateAllTypesA0(); + A0A0 v1 = new A0A0(); + v1.CreateAllTypesA0A0(); + A0A1 v2 = new A0A1(); + v2.CreateAllTypesA0A1(); + A0A0A0 v3 = new A0A0A0(); + v3.CreateAllTypesA0A0A0(); + A0A3 v4 = new A0A3(); + v4.CreateAllTypesA0A3(); + A0A0A1 v5 = new A0A0A1(); + v5.CreateAllTypesA0A0A1(); + A0A1A2>, A0A0A0A1>>, A0A0>>> v6 = new A0A1A2>, A0A0A0A1>>, A0A0>>>(); + v6.CreateAllTypesA0A1A2(); + A0A0A0A0>>>> v7 = new A0A0A0A0>>>>(); + v7.CreateAllTypesA0A0A0A0(); + A0A4 v8 = new A0A4(); + v8.CreateAllTypesA0A4(); + A0A0A3> v9 = new A0A0A3>(); + v9.CreateAllTypesA0A0A3(); + A0A1A4 v10 = new A0A1A4(); + v10.CreateAllTypesA0A1A4(); + A0A0A0A1>, IA1> v11 = new A0A0A0A1>, IA1>(); + v11.CreateAllTypesA0A0A0A1(); + A0A3A6> v12 = new A0A3A6>(); + v12.CreateAllTypesA0A3A6(); + A0A0A1A2>, A0A0A0A1>>, A0A0>>>> v13 = new A0A0A1A2>, A0A0A0A1>>, A0A0>>>>(); + v13.CreateAllTypesA0A0A1A2(); + A0A1A2A3>, A0A0A0> v14 = new A0A1A2A3>, A0A0A0>(); + v14.CreateAllTypesA0A1A2A3(); + A0A0A0A0A0>, A0A1A4> v15 = new A0A0A0A0A0>, A0A1A4>(); + v15.CreateAllTypesA0A0A0A0A0(); + System.Console.WriteLine("Test SUCCESS"); + return 100; + } + } + + public class A0A0A0 : A0A0, IA2 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A0NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A0A0GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A0A0Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A0NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A0A0(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A1>> next = new A0A1>>(); + next.RecurseA0A1((depth - 1)); + } + + public void CreateAllTypesA0A0A0() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>(); + A0.VerifyA0NotInlinedGenericStatic>, A0A0A1>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>, A0A0A1>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>, A0A0A0>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2(); + A0A1>.VerifyA0A1NotInlinedGenericStatic(); + A0A1>.VerifyA0A1NotInlinedStatic(); + A0A1>.VerifyA0A1GenericStatic>>(); + A0A1.VerifyA0A1Static(); + A0A1> v21 = new A0A1>(); + v21.VerifyA0A1NotInlinedGeneric>>(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1())); + i24.VerifyInterfaceGenericIA2>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>(); + A0A0A0>>.VerifyA0A0A0NotInlinedGenericStatic>(); + A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>, A0A0A0>>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>.VerifyA0A0A0GenericStatic>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>(); + A0A0A0>, A0A0A1>>.VerifyA0A0A0Static(); + A0A0A0>, A0A0A1>>> v25 = new A0A0A0>, A0A0A1>>>(); + v25.VerifyA0A0A0NotInlinedGeneric(); + A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>> v26 = new A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0())); + i28.VerifyInterfaceGenericIA2(); + A0A3.VerifyA0A3NotInlinedGenericStatic>, A0A0A1>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>, A0A0A1>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>(); + A0A1A2>.VerifyA0A1A2NotInlinedGenericStatic>>(); + A0A1A2>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>.VerifyA0A1A2GenericStatic(); + A0A1A2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>, A0A0A0>>>.VerifyA0A1A2Static(); + A0A1A2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>, A0A0A0>>>> v37 = new A0A1A2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>, A0A0A0>>>>(); + v37.VerifyA0A1A2NotInlinedGeneric>, A0A0A1>>(); + A0A1A2>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>> v38 = new A0A1A2>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2>())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>())); + i40.VerifyInterfaceGenericIA2>>(); + A0A0A0A0>, A0A0A1>>.VerifyA0A0A0A0NotInlinedGenericStatic>(); + A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>.VerifyA0A0A0A0GenericStatic>>(); + A0A0A0A0>>.VerifyA0A0A0A0Static(); + A0A0A0A0>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>> v41 = new A0A0A0A0>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>(); + A0A0A0A0> v42 = new A0A0A0A0>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>())); + i44.VerifyInterfaceGenericIA2>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>(); + A0A4>>.VerifyA0A4NotInlinedGenericStatic>>>(); + A0A4>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>.VerifyA0A4NotInlinedStatic(); + A0A4>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>>.VerifyA0A4GenericStatic(); + A0A4>>.VerifyA0A4Static(); + A0A4 v45 = new A0A4(); + v45.VerifyA0A4NotInlinedGeneric>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>(); + A0A4>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>> v46 = new A0A4>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>(); + v46.VerifyA0A4NotInlined(); + A0A0A3>.VerifyA0A0A3NotInlinedGenericStatic>(); + A0A0A3>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>, A0A0A1>>.VerifyA0A0A3GenericStatic(); + A0A0A3>.VerifyA0A0A3Static(); + A0A0A3>, A0A0A1>> v47 = new A0A0A3>, A0A0A1>>(); + v47.VerifyA0A0A3NotInlinedGeneric>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>(); + A0A0A3 v48 = new A0A0A3(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4, A0A3>.VerifyA0A1A4NotInlinedGenericStatic, A0A3>>(); + A0A1A4>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>, A0A3>.VerifyA0A1A4GenericStatic>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>>(); + A0A1A4, A0A0A1>.VerifyA0A1A4Static(); + A0A1A4, A0A3A6>> v49 = new A0A1A4, A0A3A6>>(); + v49.VerifyA0A1A4NotInlinedGeneric>(); + A0A1A4, A0> v50 = new A0A1A4, A0>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1>, A0A4>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>>.VerifyA0A0A0A1NotInlinedGenericStatic>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>(); + A0A0A0A1, A0A1A2A3>, A0A0A1>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>, A0A0A1>, IA1A2A5, A0A0A3>>>>.VerifyA0A0A0A1GenericStatic>(); + A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>>.VerifyA0A0A0A1Static(); + A0A0A0A1>>, A0A1A4>>>> v51 = new A0A0A0A1>>, A0A1A4>>>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric>>(); + A0A0A0A1, A0A0A1A2> v52 = new A0A0A0A1, A0A0A1A2>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6>, A0A0A1>>.VerifyA0A3A6NotInlinedGenericStatic>, A0A0A1>>>(); + A0A3A6>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6>, A0A0A1>>.VerifyA0A3A6GenericStatic>, A0A0A1>>>(); + A0A3A6>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>.VerifyA0A3A6Static(); + A0A3A6 v53 = new A0A3A6(); + v53.VerifyA0A3A6NotInlinedGeneric, A0A0A1A2>>(); + A0A3A6> v54 = new A0A3A6>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2>>.VerifyA0A0A1A2NotInlinedGenericStatic>(); + A0A0A1A2>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>.VerifyA0A0A1A2GenericStatic, A0>>(); + A0A0A1A2>.VerifyA0A0A1A2Static(); + A0A0A1A2, A0>> v55 = new A0A0A1A2, A0>>(); + v55.VerifyA0A0A1A2NotInlinedGeneric, A0A0A1A2>>(); + A0A0A1A2 v56 = new A0A0A1A2(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A1>.VerifyA0A1A2A3NotInlinedGenericStatic>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>>(); + A0A1A2A3>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A3A6>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3, A0A1A2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>.VerifyA0A1A2A3GenericStatic>>(); + A0A1A2A3>.VerifyA0A1A2A3Static(); + A0A1A2A3>, A0A0A1> v57 = new A0A1A2A3>, A0A0A1>(); + v57.VerifyA0A1A2A3NotInlinedGeneric, A0A0A1A2>>(); + A0A1A2A3>, A0A0A1>> v58 = new A0A1A2A3>, A0A0A1>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0, A0A0A1A2>, A0A0A0A0>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>.VerifyA0A0A0A0A0NotInlinedGenericStatic>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>(); + A0A0A0A0A0, A0A3>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>.VerifyA0A0A0A0A0GenericStatic, A0>>(); + A0A0A0A0A0, A0A3>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A1A4, A0>> v59 = new A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A1A4, A0>>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric(); + A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3> v60 = new A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public class A0A3 : A0, IA2 + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A3NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T t1 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A3NotInlinedStatic() + { + } + + public static void VerifyA0A3GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T t1 = new T(); + } + + public static void VerifyA0A3Static() + { + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A3NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A3NotInlined() + { + System.Console.WriteLine(this); + } + + public void RecurseA0A3(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A0A0>>>> next = new A0A0A0>>>>(); + next.RecurseA0A0A0((depth - 1)); + } + + public void CreateAllTypesA0A3() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2>, A0A0A1>>>(); + A0.VerifyA0NotInlinedGenericStatic(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic>(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>>(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic, A0>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>>(); + A0A1>, A0A0A1>>>.VerifyA0A1NotInlinedGenericStatic>(); + A0A1.VerifyA0A1NotInlinedStatic(); + A0A1>, A0A0A1>>>.VerifyA0A1GenericStatic, A0>>(); + A0A1, A0>>.VerifyA0A1Static(); + A0A1> v21 = new A0A1>(); + v21.VerifyA0A1NotInlinedGeneric>>(); + A0A1 v22 = new A0A1(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1, A0A0A1A2>>())); + i24.VerifyInterfaceGenericIA2>>(); + A0A0A0>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>.VerifyA0A0A0NotInlinedGenericStatic, A0A0A1A2>>(); + A0A0A0.VerifyA0A0A0NotInlinedStatic(); + A0A0A0.VerifyA0A0A0GenericStatic>, A0A0A1>>>(); + A0A0A0.VerifyA0A0A0Static(); + A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>> v25 = new A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>(); + v25.VerifyA0A0A0NotInlinedGeneric>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>(); + A0A0A0, A0A0A1A2>> v26 = new A0A0A0, A0A0A1A2>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>, A0A0A1>>>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0())); + i28.VerifyInterfaceGenericIA2>(); + A0A3.VerifyA0A3NotInlinedGenericStatic>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>, A0A0A1>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>>(); + A0A1A2.VerifyA0A1A2NotInlinedGenericStatic, A0A0A1A2>>>(); + A0A1A2>, A0A0A1>>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>.VerifyA0A1A2GenericStatic(); + A0A1A2>>.VerifyA0A1A2Static(); + A0A1A2, A0A0A1A2>> v37 = new A0A1A2, A0A0A1A2>>(); + v37.VerifyA0A1A2NotInlinedGeneric, A0A0A1A2>>(); + A0A1A2 v38 = new A0A1A2(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>())); + i40.VerifyInterfaceGenericIA2>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>(); + A0A0A0A0, A0A0A1A2>>>.VerifyA0A0A0A0NotInlinedGenericStatic, A0A0A1A2>>(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0>.VerifyA0A0A0A0GenericStatic>>(); + A0A0A0A0, A0>>.VerifyA0A0A0A0Static(); + A0A0A0A0, A0A0A1A2>> v41 = new A0A0A0A0, A0A0A1A2>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>>(); + A0A0A0A0>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>> v42 = new A0A0A0A0>>>>, IA1A2>>, A0A0A0>>, A0A0A0A1>>>>, IA1A2>>, A0A0A0>>, IA1A2>>>>>>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>())); + i44.VerifyInterfaceGenericIA2(); + A0A4>.VerifyA0A4NotInlinedGenericStatic>(); + A0A4.VerifyA0A4NotInlinedStatic(); + A0A4.VerifyA0A4GenericStatic(); + A0A4.VerifyA0A4Static(); + A0A4 v45 = new A0A4(); + v45.VerifyA0A4NotInlinedGeneric(); + A0A4> v46 = new A0A4>(); + v46.VerifyA0A4NotInlined(); + A0A0A3.VerifyA0A0A3NotInlinedGenericStatic>>(); + A0A0A3.VerifyA0A0A3NotInlinedStatic(); + A0A0A3>>.VerifyA0A0A3GenericStatic, A0>>(); + A0A0A3.VerifyA0A0A3Static(); + A0A0A3, A0A0A1A2>>> v47 = new A0A0A3, A0A0A1A2>>>(); + v47.VerifyA0A0A3NotInlinedGeneric>>(); + A0A0A3, A0A0A1A2>> v48 = new A0A0A3, A0A0A1A2>>(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4, A0A0A1A2>>, A0A0A0A1, A0A0A1A2>>.VerifyA0A1A4NotInlinedGenericStatic(); + A0A1A4, A0A0A1A2>>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4, A0A0A1A2>>, A0A1A2>>.VerifyA0A1A4GenericStatic>(); + A0A1A4>, A0A0A1A2>.VerifyA0A1A4Static(); + A0A1A4>>> v49 = new A0A1A4>>>(); + v49.VerifyA0A1A4NotInlinedGeneric>, A0A0A1>>>(); + A0A1A4>, A0A1A2>> v50 = new A0A1A4>, A0A1A2>>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1>, A0A0A1>>, A0A1A4>, A0A1A2>>>.VerifyA0A0A0A1NotInlinedGenericStatic(); + A0A0A0A1>, A0A0A1>>, A0A1A4>, A0A1A2>>>, A0A0A0A0>>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>>, A0A0>.VerifyA0A0A0A1GenericStatic>>, A0A0>>(); + A0A0A0A1>, A0A0A1>.VerifyA0A0A0A1Static(); + A0A0A0A1, A0A1, A0A0A1A2>>> v51 = new A0A0A0A1, A0A1, A0A0A1A2>>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric, A0A1, A0A0A1A2>>>>(); + A0A0A0A1, IA1A2A5, A0A0A3>>>> v52 = new A0A0A0A1, IA1A2A5, A0A0A3>>>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6>>.VerifyA0A3A6NotInlinedGenericStatic, A0A0A1A2>>>(); + A0A3A6.VerifyA0A3A6NotInlinedStatic(); + A0A3A6>.VerifyA0A3A6GenericStatic, IA1A2A5, A0A0A3>>>>>(); + A0A3A6.VerifyA0A3A6Static(); + A0A3A6>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>> v53 = new A0A3A6>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>(); + v53.VerifyA0A3A6NotInlinedGeneric>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>(); + A0A3A6>> v54 = new A0A3A6>>(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2>, A0A0A1>>>.VerifyA0A0A1A2NotInlinedGenericStatic>, A0A0A1>>>>(); + A0A0A1A2>>>.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2>>>.VerifyA0A0A1A2GenericStatic>>(); + A0A0A1A2>>>>.VerifyA0A0A1A2Static(); + A0A0A1A2, A0A0A1A2>>> v55 = new A0A0A1A2, A0A0A1A2>>>(); + v55.VerifyA0A0A1A2NotInlinedGeneric>>(); + A0A0A1A2 v56 = new A0A0A1A2(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>, A0A0A1>>, A0A1A2A3>, A0A0A1>>>.VerifyA0A1A2A3NotInlinedGenericStatic>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>(); + A0A1A2A3>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>, A0A3>.VerifyA0A1A2A3GenericStatic(); + A0A1A2A3>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>, A0A3>.VerifyA0A1A2A3Static(); + A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2> v57 = new A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A1A2>(); + v57.VerifyA0A1A2A3NotInlinedGeneric>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>(); + A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>> v58 = new A0A1A2A3, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0>>, A0A3>.VerifyA0A0A0A0A0NotInlinedGenericStatic>, A0A1A2>>>(); + A0A0A0A0A0>>, A0A0>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A3>.VerifyA0A0A0A0A0GenericStatic, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>>(); + A0A0A0A0A0, IA1A2A5, A0A0A3>>>>, A0A0A0A0A0>>>>>, A0A1>>>>, A0A1A4>>>, IA1>>>>>>>, A0A0A3>>, A0A4>>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0, A0A0A3, A0A0A1A2>>> v59 = new A0A0A0A0A0, A0A0A3, A0A0A1A2>>>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric(); + A0A0A0A0A0> v60 = new A0A0A0A0A0>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } + + public class A0A0A3 : A0A0 + where T0 : new() + { + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A3NotInlinedGenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public static void VerifyA0A0A3NotInlinedStatic() + { + T0 t0 = new T0(); + } + + public static void VerifyA0A0A3GenericStatic() + where T : new() + { + System.Console.WriteLine(typeof(T)); + T0 t1 = new T0(); + T t2 = new T(); + } + + public static void VerifyA0A0A3Static() + { + T0 t0 = new T0(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A3NotInlinedGeneric() + where T : new() + { + System.Console.WriteLine(this); + System.Console.WriteLine(typeof(T)); + T0 t2 = new T0(); + T t3 = new T(); + } + + [System.Runtime.CompilerServices.MethodImplAttribute(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + public void VerifyA0A0A3NotInlined() + { + System.Console.WriteLine(this); + T0 t1 = new T0(); + } + + public void RecurseA0A0A3(int depth) + { + if ((depth < 0)) + { + return; + } + System.Console.Write("."); + A0A4 next = new A0A4(); + next.RecurseA0A4((depth - 1)); + } + + public void CreateAllTypesA0A0A3() + { + A0 v0 = new A0(); + v0.VerifyInterfaceIA1(); + A0 v1 = new A0(); + v1.VerifyInterfaceGenericIA1>>>>(); + A0 v2 = new A0(); + v2.VerifyInterfaceIA2(); + A0 v3 = new A0(); + v3.VerifyInterfaceGenericIA2, A0A0A1>>, A0A0A0A1>>(); + A0.VerifyA0NotInlinedGenericStatic>>>>(); + A0.VerifyA0NotInlinedStatic(); + A0.VerifyA0GenericStatic(); + A0.VerifyA0Static(); + A0 v4 = new A0(); + v4.VerifyA0NotInlinedGeneric(); + A0 v5 = new A0(); + v5.VerifyA0NotInlined(); + A0 v6 = new A0(); + v6.VirtualVerifyGeneric>>>>(); + A0 v7 = new A0(); + v7.VirtualVerify(); + A0 v8 = new A0(); + v8.DeepRecursion(); + IA1 i9 = ((IA1)(new A0())); + i9.VerifyInterfaceIA1(); + IA1 i10 = ((IA1)(new A0())); + i10.VerifyInterfaceGenericIA1>>>>(); + IA2 i11 = ((IA2)(new A0())); + i11.VerifyInterfaceIA2(); + IA2 i12 = ((IA2)(new A0())); + i12.VerifyInterfaceGenericIA2>>>>>(); + A0A0.VerifyA0A0NotInlinedGenericStatic>>>>(); + A0A0.VerifyA0A0NotInlinedStatic(); + A0A0.VerifyA0A0GenericStatic, A0A0A1>>, A0A0A0A1>>(); + A0A0.VerifyA0A0Static(); + A0A0 v13 = new A0A0(); + v13.VerifyA0A0NotInlinedGeneric(); + A0A0 v14 = new A0A0(); + v14.VerifyA0A0NotInlined(); + A0A0 v15 = new A0A0(); + v15.VirtualVerifyGeneric>>, A0A1A4>>>>(); + A0A0 v16 = new A0A0(); + v16.VirtualVerify(); + IA1 i17 = ((IA1)(new A0A0())); + i17.VerifyInterfaceIA1(); + IA1 i18 = ((IA1)(new A0A0())); + i18.VerifyInterfaceGenericIA1>(); + IA2 i19 = ((IA2)(new A0A0())); + i19.VerifyInterfaceIA2(); + IA2 i20 = ((IA2)(new A0A0())); + i20.VerifyInterfaceGenericIA2(); + A0A1>>>>.VerifyA0A1NotInlinedGenericStatic>>(); + A0A1, A0A0A1>>, A0A0A0A1>>.VerifyA0A1NotInlinedStatic(); + A0A1>>>>>.VerifyA0A1GenericStatic(); + A0A1.VerifyA0A1Static(); + A0A1>> v21 = new A0A1>>(); + v21.VerifyA0A1NotInlinedGeneric(); + A0A1, A0A0A1>>, A0A0A0A1>> v22 = new A0A1, A0A0A1>>, A0A0A0A1>>(); + v22.VerifyA0A1NotInlined(); + IA2 i23 = ((IA2)(new A0A1, A0A0A1>>, A0A0A0A1>>>())); + i23.VerifyInterfaceIA2(); + IA2 i24 = ((IA2)(new A0A1>>>>>())); + i24.VerifyInterfaceGenericIA2>>>>(); + A0A0A0, A0A0A1>>, A0A0A0A1>>.VerifyA0A0A0NotInlinedGenericStatic(); + A0A0A0>>>>.VerifyA0A0A0NotInlinedStatic(); + A0A0A0>>, A0A1>>>>>.VerifyA0A0A0GenericStatic>>>>(); + A0A0A0>>>.VerifyA0A0A0Static(); + A0A0A0>>>>>> v25 = new A0A0A0>>>>>>(); + v25.VerifyA0A0A0NotInlinedGeneric, A0A0A1>>, A0A0A0A1>>(); + A0A0A0>>> v26 = new A0A0A0>>>(); + v26.VerifyA0A0A0NotInlined(); + IA2 i27 = ((IA2)(new A0A0A0>())); + i27.VerifyInterfaceIA2(); + IA2 i28 = ((IA2)(new A0A0A0>>>>>>())); + i28.VerifyInterfaceGenericIA2(); + A0A3.VerifyA0A3NotInlinedGenericStatic>>>>(); + A0A3.VerifyA0A3NotInlinedStatic(); + A0A3.VerifyA0A3GenericStatic>(); + A0A3.VerifyA0A3Static(); + A0A3 v29 = new A0A3(); + v29.VerifyA0A3NotInlinedGeneric(); + A0A3 v30 = new A0A3(); + v30.VerifyA0A3NotInlined(); + IA2 i31 = ((IA2)(new A0A3())); + i31.VerifyInterfaceIA2(); + IA2 i32 = ((IA2)(new A0A3())); + i32.VerifyInterfaceGenericIA2>>>>(); + A0A0A1.VerifyA0A0A1NotInlinedGenericStatic>>>(); + A0A0A1.VerifyA0A0A1NotInlinedStatic(); + A0A0A1.VerifyA0A0A1GenericStatic>>, A0A1>>>>>(); + A0A0A1.VerifyA0A0A1Static(); + A0A0A1 v33 = new A0A0A1(); + v33.VerifyA0A0A1NotInlinedGeneric>>>>>>(); + A0A0A1 v34 = new A0A0A1(); + v34.VerifyA0A0A1NotInlined(); + IA2 i35 = ((IA2)(new A0A0A1())); + i35.VerifyInterfaceIA2(); + IA2 i36 = ((IA2)(new A0A0A1())); + i36.VerifyInterfaceGenericIA2(); + A0A1A2>>>>>>.VerifyA0A1A2NotInlinedGenericStatic, A0A1A2A3>>>, A0A4>>>(); + A0A1A2, A0A0A1>>, A0A0A0A1>>.VerifyA0A1A2NotInlinedStatic(); + A0A1A2>.VerifyA0A1A2GenericStatic>(); + A0A1A2>>.VerifyA0A1A2Static(); + A0A1A2>>>> v37 = new A0A1A2>>>>(); + v37.VerifyA0A1A2NotInlinedGeneric>>>>>(); + A0A1A2>> v38 = new A0A1A2>>(); + v38.VerifyA0A1A2NotInlined(); + IA2 i39 = ((IA2)(new A0A1A2())); + i39.VerifyInterfaceIA2(); + IA2 i40 = ((IA2)(new A0A1A2>>, A0A1>>>>>())); + i40.VerifyInterfaceGenericIA2>>>>>>>(); + A0A0A0A0.VerifyA0A0A0A0NotInlinedGenericStatic>>>>(); + A0A0A0A0>>>>>.VerifyA0A0A0A0NotInlinedStatic(); + A0A0A0A0.VerifyA0A0A0A0GenericStatic(); + A0A0A0A0>>>>.VerifyA0A0A0A0Static(); + A0A0A0A0>>>>>>> v41 = new A0A0A0A0>>>>>>>(); + v41.VerifyA0A0A0A0NotInlinedGeneric>(); + A0A0A0A0> v42 = new A0A0A0A0>(); + v42.VerifyA0A0A0A0NotInlined(); + IA2 i43 = ((IA2)(new A0A0A0A0>>>>>>())); + i43.VerifyInterfaceIA2(); + IA2 i44 = ((IA2)(new A0A0A0A0>>())); + i44.VerifyInterfaceGenericIA2>(); + A0A4>>, A0A1>>>>>>.VerifyA0A4NotInlinedGenericStatic(); + A0A4>>, A0A1>>>>>>.VerifyA0A4NotInlinedStatic(); + A0A4>>>>.VerifyA0A4GenericStatic(); + A0A4>>>>>>>.VerifyA0A4Static(); + A0A4> v45 = new A0A4>(); + v45.VerifyA0A4NotInlinedGeneric, A0A0A1>>, A0A0A0A1>>(); + A0A4>>, A0A1>>>>> v46 = new A0A4>>, A0A1>>>>>(); + v46.VerifyA0A4NotInlined(); + A0A0A3>>, A0A1>>>>>>.VerifyA0A0A3NotInlinedGenericStatic(); + A0A0A3>>>>.VerifyA0A0A3NotInlinedStatic(); + A0A0A3, A0A0A1>>, A0A0A0A1>>.VerifyA0A0A3GenericStatic>>>>>>>(); + A0A0A3.VerifyA0A0A3Static(); + A0A0A3 v47 = new A0A0A3(); + v47.VerifyA0A0A3NotInlinedGeneric>>>>>(); + A0A0A3>>>>> v48 = new A0A0A3>>>>>(); + v48.VerifyA0A0A3NotInlined(); + A0A1A4>>, A0A1>>>>>>.VerifyA0A1A4NotInlinedGenericStatic>>, A0A1>>>>>>(); + A0A1A4, A0A1A2A3>>>, A0A4>>, IA2A6>>, A0A1A4>>>>.VerifyA0A1A4NotInlinedStatic(); + A0A1A4>>>, IA1A2A5, A0A0A3>>>>.VerifyA0A1A4GenericStatic(); + A0A1A4>>>>.VerifyA0A1A4Static(); + A0A1A4>>>, A0A1A4>>>>> v49 = new A0A1A4>>>, A0A1A4>>>>>(); + v49.VerifyA0A1A4NotInlinedGeneric>>, A0A1>>>>>>(); + A0A1A4>>, A0A1>>>>, A0A3> v50 = new A0A1A4>>, A0A1>>>>, A0A3>(); + v50.VerifyA0A1A4NotInlined(); + A0A0A0A1>>>>, A0A0>.VerifyA0A0A0A1NotInlinedGenericStatic>>, A0A1>>>>>>(); + A0A0A0A1>>, A0A1>>>>>.VerifyA0A0A0A1NotInlinedStatic(); + A0A0A0A1>>, A0A1>>>>>>.VerifyA0A0A0A1GenericStatic>>>>>>>(); + A0A0A0A1.VerifyA0A0A0A1Static(); + A0A0A0A1>>, A0A1>>>>, A0A0A0A0>>> v51 = new A0A0A0A1>>, A0A1>>>>, A0A0A0A0>>>(); + v51.VerifyA0A0A0A1NotInlinedGeneric(); + A0A0A0A1>>, A0A1>>>>>, A0A3A6>>>>> v52 = new A0A0A0A1>>, A0A1>>>>>, A0A3A6>>>>>(); + v52.VerifyA0A0A0A1NotInlined(); + A0A3A6>>, A0A1>>>>, A0A3>>.VerifyA0A3A6NotInlinedGenericStatic>>>>>>>(); + A0A3A6>>, A0A1>>>>, A0A3>>>.VerifyA0A3A6NotInlinedStatic(); + A0A3A6.VerifyA0A3A6GenericStatic(); + A0A3A6>>>>>>>.VerifyA0A3A6Static(); + A0A3A6 v53 = new A0A3A6(); + v53.VerifyA0A3A6NotInlinedGeneric>>, A0A1>>>>>>(); + A0A3A6 v54 = new A0A3A6(); + v54.VerifyA0A3A6NotInlined(); + A0A0A1A2>>, A0A1>>>>, A0A3>>.VerifyA0A0A1A2NotInlinedGenericStatic>>, A0A1>>>>>(); + A0A0A1A2.VerifyA0A0A1A2NotInlinedStatic(); + A0A0A1A2>.VerifyA0A0A1A2GenericStatic>>>>>>(); + A0A0A1A2, A0A1A2A3>>>, A0A4>>>.VerifyA0A0A1A2Static(); + A0A0A1A2 v55 = new A0A0A1A2(); + v55.VerifyA0A0A1A2NotInlinedGeneric>(); + A0A0A1A2 v56 = new A0A0A1A2(); + v56.VerifyA0A0A1A2NotInlined(); + A0A1A2A3>>, A0A1>>>>>, A0A0A1A2>.VerifyA0A1A2A3NotInlinedGenericStatic>>>>>>(); + A0A1A2A3>>>>>, A0A0A0A0A0>>, A0A1>>>>>.VerifyA0A1A2A3NotInlinedStatic(); + A0A1A2A3, A0A1A2>>, A0A1>>>>>>.VerifyA0A1A2A3GenericStatic>>, A0A1>>>>>, A0A3A6>>>>>>(); + A0A1A2A3>>>>>, A0A0A0>>>>>>>.VerifyA0A1A2A3Static(); + A0A1A2A3>>, A0A1>>>>, A0A3>, A0> v57 = new A0A1A2A3>>, A0A1>>>>, A0A3>, A0>(); + v57.VerifyA0A1A2A3NotInlinedGeneric(); + A0A1A2A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>> v58 = new A0A1A2A3>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>(); + v58.VerifyA0A1A2A3NotInlined(); + A0A0A0A0A0>>, A0A1>>>>>, A0A0>.VerifyA0A0A0A0A0NotInlinedGenericStatic>>, A0A1>>>>>>(); + A0A0A0A0A0>>, A0A1>>>>>, A0A3A6>>>>>, A0A0A3>>>>>>, A0A4>>, A0A1>>>>>>.VerifyA0A0A0A0A0NotInlinedStatic(); + A0A0A0A0A0, A0A0>.VerifyA0A0A0A0A0GenericStatic>>>(); + A0A0A0A0A0>>>>>, A0A1>>>>>>.VerifyA0A0A0A0A0Static(); + A0A0A0A0A0>>>>>, A0A1>>>>>>> v59 = new A0A0A0A0A0>>>>>, A0A1>>>>>>>(); + v59.VerifyA0A0A0A0A0NotInlinedGeneric(); + A0A0A0A0A0>>, A0A1>>>>>, A0> v60 = new A0A0A0A0A0>>, A0A1>>>>>, A0>(); + v60.VerifyA0A0A0A0A0NotInlined(); + } + } +} diff --git a/tests/src/JIT/Generics/Coverage/cs_template.proj b/tests/src/JIT/Generics/Coverage/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/Coverage/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/Coverage/packages.config b/tests/src/JIT/Generics/Coverage/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/Coverage/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/Instantiation/Classes/BaseClass01.cs b/tests/src/JIT/Generics/Instantiation/Classes/BaseClass01.cs new file mode 100644 index 0000000..b007e11 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/BaseClass01.cs @@ -0,0 +1,190 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class GenBase +{ + public T Fld1; + + public GenBase(T fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(GenBase)); + } + + return result; + } +} + +public class GenInt : GenBase +{ + public GenInt() : base(1) { } + + public bool InstVerify() + { + return base.InstVerify(typeof(int)); + } +} + +public class GenDouble : GenBase +{ + public GenDouble() : base(1) { } + + public bool InstVerify() + { + return base.InstVerify(typeof(double)); + } +} + +public class GenString : GenBase +{ + public GenString() : base("string") { } + + public bool InstVerify() + { + return base.InstVerify(typeof(string)); + } +} + +public class GenObject : GenBase +{ + public GenObject() : base(new object()) { } + + public bool InstVerify() + { + return base.InstVerify(typeof(object)); + } +} + +public class GenGuid : GenBase +{ + public GenGuid() : base(new Guid()) { } + + public bool InstVerify() + { + return base.InstVerify(typeof(Guid)); + } +} + +public class GenConstructedReference : GenBase> +{ + public GenConstructedReference() : base(new RefX1()) { } + + public bool InstVerify() + { + return base.InstVerify(typeof(RefX1)); + } +} + +public class GenConstructedValue : GenBase> +{ + public GenConstructedValue() : base(new ValX1()) { } + + public bool InstVerify() + { + return base.InstVerify(typeof(ValX1)); + } +} + + +public class GenInt1DArray : GenBase +{ + public GenInt1DArray() : base(new int[1]) { } + + public bool InstVerify() + { + return base.InstVerify(typeof(int[])); + } +} + +public class GenString2DArray : GenBase +{ + public GenString2DArray() : base(new string[1, 1]) { } + + public bool InstVerify() + { + return base.InstVerify(typeof(string[,])); + } +} + +public class GenIntJaggedArray : GenBase +{ + public GenIntJaggedArray() : base(new int[1][]) { } + + public bool InstVerify() + { + return base.InstVerify(typeof(int[][])); + } +} + + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new GenInt().InstVerify()); + Eval(new GenDouble().InstVerify()); + Eval(new GenString().InstVerify()); + Eval(new GenObject().InstVerify()); + Eval(new GenGuid().InstVerify()); + Eval(new GenConstructedReference().InstVerify()); + Eval(new GenConstructedValue().InstVerify()); + Eval(new GenInt1DArray().InstVerify()); + Eval(new GenString2DArray().InstVerify()); + Eval(new GenIntJaggedArray().InstVerify()); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Classes/BaseClass02.cs b/tests/src/JIT/Generics/Instantiation/Classes/BaseClass02.cs new file mode 100644 index 0000000..7197faf --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/BaseClass02.cs @@ -0,0 +1,152 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class GenBase +{ + public T Fld1; + + public GenBase(T fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(GenBase)); + } + + return result; + } +} + +public class Gen : GenBase +{ + public Gen(T fld1) : base(fld1) { } + + new public bool InstVerify(System.Type t1) + { + return base.InstVerify(t1); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int())).InstVerify(typeof(int))); + Eval((new Gen(new double())).InstVerify(typeof(double))); + Eval((new Gen("string")).InstVerify(typeof(string))); + Eval((new Gen(new object())).InstVerify(typeof(object))); + Eval((new Gen(new Guid())).InstVerify(typeof(Guid))); + + Eval((new Gen(new int[1])).InstVerify(typeof(int[]))); + Eval((new Gen(new double[1, 1])).InstVerify(typeof(double[,]))); + Eval((new Gen(new string[1][][])).InstVerify(typeof(string[][][]))); + Eval((new Gen(new object[1, 1, 1, 1])).InstVerify(typeof(object[, , ,]))); + Eval((new Gen(new Guid[1][, , ,][])).InstVerify(typeof(Guid[][, , ,][]))); + + Eval((new Gen[]>(new RefX1[] { })).InstVerify(typeof(RefX1[]))); + Eval((new Gen[,]>(new RefX1[1, 1])).InstVerify(typeof(RefX1[,]))); + Eval((new Gen[][][]>(new RefX1[1][][])).InstVerify(typeof(RefX1[][][]))); + Eval((new Gen[, , ,]>(new RefX1[1, 1, 1, 1])).InstVerify(typeof(RefX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX1[1][, , ,][])).InstVerify(typeof(RefX1[][, , ,][]))); + + Eval((new Gen[]>(new RefX2[] { })).InstVerify(typeof(RefX2[]))); + Eval((new Gen[,]>(new RefX2[1, 1])).InstVerify(typeof(RefX2[,]))); + Eval((new Gen[][][]>(new RefX2[1][][])).InstVerify(typeof(RefX2[][][]))); + Eval((new Gen[, , ,]>(new RefX2[1, 1, 1, 1])).InstVerify(typeof(RefX2[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX2[1][, , ,][])).InstVerify(typeof(RefX2[][, , ,][]))); + + Eval((new Gen[]>(new ValX1[] { })).InstVerify(typeof(ValX1[]))); + Eval((new Gen[,]>(new ValX1[1, 1])).InstVerify(typeof(ValX1[,]))); + Eval((new Gen[][][]>(new ValX1[1][][])).InstVerify(typeof(ValX1[][][]))); + Eval((new Gen[, , ,]>(new ValX1[1, 1, 1, 1])).InstVerify(typeof(ValX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new ValX1[1][, , ,][])).InstVerify(typeof(ValX1[][, , ,][]))); + + Eval((new Gen[]>(new ValX2[] { })).InstVerify(typeof(ValX2[]))); + Eval((new Gen[,]>(new ValX2[1, 1])).InstVerify(typeof(ValX2[,]))); + Eval((new Gen[][][]>(new ValX2[1][][])).InstVerify(typeof(ValX2[][][]))); + Eval((new Gen[, , ,]>(new ValX2[1, 1, 1, 1])).InstVerify(typeof(ValX2[, , ,]))); + + Eval((new Gen[][, , ,][]>(new ValX2[1][, , ,][])).InstVerify(typeof(ValX2[][, , ,][]))); + + Eval((new Gen>(new RefX1())).InstVerify(typeof(RefX1))); + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>(new RefX2())).InstVerify(typeof(RefX2))); + Eval((new Gen>(new RefX3())).InstVerify(typeof(RefX3))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>>>(new RefX1>>())).InstVerify(typeof(RefX1>>))); + Eval((new Gen>>>>(new RefX1>>>())).InstVerify(typeof(RefX1>>>))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen, RefX3>>>, RefX2, RefX3>>>>>(new RefX2, RefX3>>>, RefX2, RefX3>>>>())).InstVerify(typeof(RefX2, RefX3>>>, RefX2, RefX3>>>>))); + Eval((new Gen, RefX2, RefX3>>(new RefX3, RefX2, RefX3>())).InstVerify(typeof(RefX3, RefX2, RefX3>))); + + Eval((new Gen>(new ValX1())).InstVerify(typeof(ValX1))); + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>(new ValX2())).InstVerify(typeof(ValX2))); + Eval((new Gen>(new ValX3())).InstVerify(typeof(ValX3))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>>>(new ValX1>>())).InstVerify(typeof(ValX1>>))); + Eval((new Gen>>>>(new ValX1>>>())).InstVerify(typeof(ValX1>>>))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen, ValX3>>>, ValX2, ValX3>>>>>(new ValX2, ValX3>>>, ValX2, ValX3>>>>())).InstVerify(typeof(ValX2, ValX3>>>, ValX2, ValX3>>>>))); + Eval((new Gen, ValX2, ValX3>>(new ValX3, ValX2, ValX3>())).InstVerify(typeof(ValX3, ValX2, ValX3>))); + + + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Classes/BaseClass03.cs b/tests/src/JIT/Generics/Instantiation/Classes/BaseClass03.cs new file mode 100644 index 0000000..26d76bc --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/BaseClass03.cs @@ -0,0 +1,161 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class GenBase +{ + public T Fld1; + public U Fld2; + + public GenBase(T fld1, U fld2) + { + Fld1 = fld1; + Fld2 = fld2; + } + + public bool InstVerify(System.Type t1, System.Type t2) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(GenBase)); + } + + if (!(Fld2.GetType().Equals(t2))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(GenBase)); + } + + return result; + } +} + + +public class Gen : GenBase +{ + public Gen(T fld1) : base(fld1, 1) { } + + public bool InstVerify(System.Type t1) + { + return base.InstVerify(t1, typeof(int)); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int())).InstVerify(typeof(int))); + Eval((new Gen(new double())).InstVerify(typeof(double))); + Eval((new Gen("string")).InstVerify(typeof(string))); + Eval((new Gen(new object())).InstVerify(typeof(object))); + Eval((new Gen(new Guid())).InstVerify(typeof(Guid))); + + Eval((new Gen(new int[1])).InstVerify(typeof(int[]))); + Eval((new Gen(new double[1, 1])).InstVerify(typeof(double[,]))); + Eval((new Gen(new string[1][][])).InstVerify(typeof(string[][][]))); + Eval((new Gen(new object[1, 1, 1, 1])).InstVerify(typeof(object[, , ,]))); + Eval((new Gen(new Guid[1][, , ,][])).InstVerify(typeof(Guid[][, , ,][]))); + + Eval((new Gen[]>(new RefX1[] { })).InstVerify(typeof(RefX1[]))); + Eval((new Gen[,]>(new RefX1[1, 1])).InstVerify(typeof(RefX1[,]))); + Eval((new Gen[][][]>(new RefX1[1][][])).InstVerify(typeof(RefX1[][][]))); + Eval((new Gen[, , ,]>(new RefX1[1, 1, 1, 1])).InstVerify(typeof(RefX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX1[1][, , ,][])).InstVerify(typeof(RefX1[][, , ,][]))); + + Eval((new Gen[]>(new RefX2[] { })).InstVerify(typeof(RefX2[]))); + Eval((new Gen[,]>(new RefX2[1, 1])).InstVerify(typeof(RefX2[,]))); + Eval((new Gen[][][]>(new RefX2[1][][])).InstVerify(typeof(RefX2[][][]))); + Eval((new Gen[, , ,]>(new RefX2[1, 1, 1, 1])).InstVerify(typeof(RefX2[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX2[1][, , ,][])).InstVerify(typeof(RefX2[][, , ,][]))); + + Eval((new Gen[]>(new ValX1[] { })).InstVerify(typeof(ValX1[]))); + Eval((new Gen[,]>(new ValX1[1, 1])).InstVerify(typeof(ValX1[,]))); + Eval((new Gen[][][]>(new ValX1[1][][])).InstVerify(typeof(ValX1[][][]))); + Eval((new Gen[, , ,]>(new ValX1[1, 1, 1, 1])).InstVerify(typeof(ValX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new ValX1[1][, , ,][])).InstVerify(typeof(ValX1[][, , ,][]))); + + Eval((new Gen[]>(new ValX2[] { })).InstVerify(typeof(ValX2[]))); + Eval((new Gen[,]>(new ValX2[1, 1])).InstVerify(typeof(ValX2[,]))); + Eval((new Gen[][][]>(new ValX2[1][][])).InstVerify(typeof(ValX2[][][]))); + Eval((new Gen[, , ,]>(new ValX2[1, 1, 1, 1])).InstVerify(typeof(ValX2[, , ,]))); + + Eval((new Gen[][, , ,][]>(new ValX2[1][, , ,][])).InstVerify(typeof(ValX2[][, , ,][]))); + + Eval((new Gen>(new RefX1())).InstVerify(typeof(RefX1))); + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>(new RefX2())).InstVerify(typeof(RefX2))); + Eval((new Gen>(new RefX3())).InstVerify(typeof(RefX3))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>>>(new RefX1>>())).InstVerify(typeof(RefX1>>))); + Eval((new Gen>>>>(new RefX1>>>())).InstVerify(typeof(RefX1>>>))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen, RefX3>>>, RefX2, RefX3>>>>>(new RefX2, RefX3>>>, RefX2, RefX3>>>>())).InstVerify(typeof(RefX2, RefX3>>>, RefX2, RefX3>>>>))); + Eval((new Gen, RefX2, RefX3>>(new RefX3, RefX2, RefX3>())).InstVerify(typeof(RefX3, RefX2, RefX3>))); + + Eval((new Gen>(new ValX1())).InstVerify(typeof(ValX1))); + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>(new ValX2())).InstVerify(typeof(ValX2))); + Eval((new Gen>(new ValX3())).InstVerify(typeof(ValX3))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>>>(new ValX1>>())).InstVerify(typeof(ValX1>>))); + Eval((new Gen>>>>(new ValX1>>>())).InstVerify(typeof(ValX1>>>))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen, ValX3>>>, ValX2, ValX3>>>>>(new ValX2, ValX3>>>, ValX2, ValX3>>>>())).InstVerify(typeof(ValX2, ValX3>>>, ValX2, ValX3>>>>))); + Eval((new Gen, ValX2, ValX3>>(new ValX3, ValX2, ValX3>())).InstVerify(typeof(ValX3, ValX2, ValX3>))); + + + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Classes/Baseclass04.cs b/tests/src/JIT/Generics/Instantiation/Classes/Baseclass04.cs new file mode 100644 index 0000000..819f1d3 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/Baseclass04.cs @@ -0,0 +1,178 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class GenBase +{ + public T Fld1; + public U Fld2; + + public GenBase(T fld1, U fld2) + { + Fld1 = fld1; + Fld2 = fld2; + } + + public bool InstVerify(System.Type t1, System.Type t2) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(GenBase)); + } + + if (!(Fld2.GetType().Equals(t2))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(GenBase)); + } + + return result; + } +} + +public class Gen : GenBase +{ + public Gen(T fld1, U fld2) : base(fld1, fld2) { } + new public bool InstVerify(System.Type t1, System.Type t2) + { + return base.InstVerify(t1, t2); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int(), new int())).InstVerify(typeof(int), typeof(int))); + Eval((new Gen(new int(), new double())).InstVerify(typeof(int), typeof(double))); + Eval((new Gen(new int(), "string")).InstVerify(typeof(int), typeof(string))); + Eval((new Gen(new int(), new object())).InstVerify(typeof(int), typeof(object))); + Eval((new Gen(new int(), new Guid())).InstVerify(typeof(int), typeof(Guid))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + + Eval((new Gen(new double(), new int())).InstVerify(typeof(double), typeof(int))); + Eval((new Gen(new double(), new double())).InstVerify(typeof(double), typeof(double))); + Eval((new Gen(new double(), "string")).InstVerify(typeof(double), typeof(string))); + Eval((new Gen(new double(), new object())).InstVerify(typeof(double), typeof(object))); + Eval((new Gen(new double(), new Guid())).InstVerify(typeof(double), typeof(Guid))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + + Eval((new Gen("string", new int())).InstVerify(typeof(string), typeof(int))); + Eval((new Gen("string", new double())).InstVerify(typeof(string), typeof(double))); + Eval((new Gen("string", "string")).InstVerify(typeof(string), typeof(string))); + Eval((new Gen("string", new object())).InstVerify(typeof(string), typeof(object))); + Eval((new Gen("string", new Guid())).InstVerify(typeof(string), typeof(Guid))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + + Eval((new Gen(new object(), new int())).InstVerify(typeof(object), typeof(int))); + Eval((new Gen(new object(), new double())).InstVerify(typeof(object), typeof(double))); + Eval((new Gen(new object(), "string")).InstVerify(typeof(object), typeof(string))); + Eval((new Gen(new object(), new object())).InstVerify(typeof(object), typeof(object))); + Eval((new Gen(new object(), new Guid())).InstVerify(typeof(object), typeof(Guid))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + + Eval((new Gen(new Guid(), new int())).InstVerify(typeof(Guid), typeof(int))); + Eval((new Gen(new Guid(), new double())).InstVerify(typeof(Guid), typeof(double))); + Eval((new Gen(new Guid(), "string")).InstVerify(typeof(Guid), typeof(string))); + Eval((new Gen(new Guid(), new object())).InstVerify(typeof(Guid), typeof(object))); + Eval((new Gen(new Guid(), new Guid())).InstVerify(typeof(Guid), typeof(Guid))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + + Eval((new Gen, int>(new RefX1(), new int())).InstVerify(typeof(RefX1), typeof(int))); + Eval((new Gen, double>(new RefX1(), new double())).InstVerify(typeof(RefX1), typeof(double))); + Eval((new Gen, string>(new RefX1(), "string")).InstVerify(typeof(RefX1), typeof(string))); + Eval((new Gen, object>(new RefX1(), new object())).InstVerify(typeof(RefX1), typeof(object))); + Eval((new Gen, Guid>(new RefX1(), new Guid())).InstVerify(typeof(RefX1), typeof(Guid))); + Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); + Eval((new Gen, RefX1>(new RefX1(), new RefX1())).InstVerify(typeof(RefX1), typeof(RefX1))); + Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); + Eval((new Gen, ValX1>>(new RefX1(), new ValX1>())).InstVerify(typeof(RefX1), typeof(ValX1>))); + Eval((new Gen, ValX1>(new RefX1(), new ValX1())).InstVerify(typeof(RefX1), typeof(ValX1))); + Eval((new Gen, ValX1[][, , ,][]>>(new RefX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(RefX1), typeof(ValX1[][, , ,][]>))); + + Eval((new Gen, int>(new ValX1(), new int())).InstVerify(typeof(ValX1), typeof(int))); + Eval((new Gen, double>(new ValX1(), new double())).InstVerify(typeof(ValX1), typeof(double))); + Eval((new Gen, string>(new ValX1(), "string")).InstVerify(typeof(ValX1), typeof(string))); + Eval((new Gen, object>(new ValX1(), new object())).InstVerify(typeof(ValX1), typeof(object))); + Eval((new Gen, Guid>(new ValX1(), new Guid())).InstVerify(typeof(ValX1), typeof(Guid))); + Eval((new Gen, RefX1>>(new ValX1(), new RefX1>())).InstVerify(typeof(ValX1), typeof(RefX1>))); + Eval((new Gen, RefX1>(new ValX1(), new RefX1())).InstVerify(typeof(ValX1), typeof(RefX1))); + Eval((new Gen, RefX1[][, , ,][]>>(new ValX1(), new RefX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(RefX1[][, , ,][]>))); + Eval((new Gen, ValX1>>(new ValX1(), new ValX1>())).InstVerify(typeof(ValX1), typeof(ValX1>))); + Eval((new Gen, ValX1>(new ValX1(), new ValX1())).InstVerify(typeof(ValX1), typeof(ValX1))); + Eval((new Gen, ValX1[][, , ,][]>>(new ValX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(ValX1[][, , ,][]>))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Classes/Baseclass05.cs b/tests/src/JIT/Generics/Instantiation/Classes/Baseclass05.cs new file mode 100644 index 0000000..4a36ee0 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/Baseclass05.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + +public class GenBase +{ + public T Fld1; + public U Fld2; + + public V Fld3; + + public GenBase(T fld1, U fld2, V fld3) + { + Fld1 = fld1; + Fld2 = fld2; + Fld3 = fld3; + + } + + public bool InstVerify(System.Type t1, System.Type t2, System.Type t3) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(GenBase)); + } + + if (!(Fld2.GetType().Equals(t2))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(GenBase)); + } + + if (!(Fld3.GetType().Equals(t3))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld3 in: " + typeof(GenBase)); + } + + return result; + } +} + +public class Gen : GenBase +{ + public Gen(T fld1, U fld2, V fld3) : base(fld1, fld2, fld3) { } + new public bool InstVerify(System.Type t1, System.Type t2, System.Type t3) + { + return base.InstVerify(t1, t2, t3); + } +} +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int(), new double(), new Guid())).InstVerify(typeof(int), typeof(double), typeof(Guid))); + Eval((new Gen(new double(), new Guid(), "string")).InstVerify(typeof(double), typeof(Guid), typeof(string))); + Eval((new Gen(new Guid(), "string", new object())).InstVerify(typeof(Guid), typeof(string), typeof(object))); + Eval((new Gen("string", new object(), new int[1])).InstVerify(typeof(string), typeof(object), typeof(int[]))); + Eval((new Gen>>(new object(), new int[1], new RefX1>())).InstVerify(typeof(object), typeof(int[]), typeof(RefX1>))); + Eval((new Gen>, ValX1>>(new int[1], new RefX1>(), new ValX1>())).InstVerify(typeof(int[]), typeof(RefX1>), typeof(ValX1>))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Classes/Classes.csproj b/tests/src/JIT/Generics/Instantiation/Classes/Classes.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/Classes.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/Instantiation/Classes/app.config b/tests/src/JIT/Generics/Instantiation/Classes/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/Instantiation/Classes/class01.cs b/tests/src/JIT/Generics/Instantiation/Classes/class01.cs new file mode 100644 index 0000000..17612e3 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/class01.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public T Fld1; + + public Gen(T fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int())).InstVerify(typeof(int))); + Eval((new Gen(new double())).InstVerify(typeof(double))); + Eval((new Gen("string")).InstVerify(typeof(string))); + Eval((new Gen(new object())).InstVerify(typeof(object))); + Eval((new Gen(new Guid())).InstVerify(typeof(Guid))); + + Eval((new Gen(new int[1])).InstVerify(typeof(int[]))); + Eval((new Gen(new double[1, 1])).InstVerify(typeof(double[,]))); + Eval((new Gen(new string[1][][])).InstVerify(typeof(string[][][]))); + Eval((new Gen(new object[1, 1, 1, 1])).InstVerify(typeof(object[, , ,]))); + Eval((new Gen(new Guid[1][, , ,][])).InstVerify(typeof(Guid[][, , ,][]))); + + Eval((new Gen[]>(new RefX1[] { })).InstVerify(typeof(RefX1[]))); + Eval((new Gen[,]>(new RefX1[1, 1])).InstVerify(typeof(RefX1[,]))); + Eval((new Gen[][][]>(new RefX1[1][][])).InstVerify(typeof(RefX1[][][]))); + Eval((new Gen[, , ,]>(new RefX1[1, 1, 1, 1])).InstVerify(typeof(RefX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX1[1][, , ,][])).InstVerify(typeof(RefX1[][, , ,][]))); + + Eval((new Gen[]>(new RefX2[] { })).InstVerify(typeof(RefX2[]))); + Eval((new Gen[,]>(new RefX2[1, 1])).InstVerify(typeof(RefX2[,]))); + Eval((new Gen[][][]>(new RefX2[1][][])).InstVerify(typeof(RefX2[][][]))); + Eval((new Gen[, , ,]>(new RefX2[1, 1, 1, 1])).InstVerify(typeof(RefX2[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX2[1][, , ,][])).InstVerify(typeof(RefX2[][, , ,][]))); + + Eval((new Gen[]>(new ValX1[] { })).InstVerify(typeof(ValX1[]))); + Eval((new Gen[,]>(new ValX1[1, 1])).InstVerify(typeof(ValX1[,]))); + Eval((new Gen[][][]>(new ValX1[1][][])).InstVerify(typeof(ValX1[][][]))); + Eval((new Gen[, , ,]>(new ValX1[1, 1, 1, 1])).InstVerify(typeof(ValX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new ValX1[1][, , ,][])).InstVerify(typeof(ValX1[][, , ,][]))); + + Eval((new Gen[]>(new ValX2[] { })).InstVerify(typeof(ValX2[]))); + Eval((new Gen[,]>(new ValX2[1, 1])).InstVerify(typeof(ValX2[,]))); + Eval((new Gen[][][]>(new ValX2[1][][])).InstVerify(typeof(ValX2[][][]))); + Eval((new Gen[, , ,]>(new ValX2[1, 1, 1, 1])).InstVerify(typeof(ValX2[, , ,]))); + + Eval((new Gen[][, , ,][]>(new ValX2[1][, , ,][])).InstVerify(typeof(ValX2[][, , ,][]))); + + Eval((new Gen>(new RefX1())).InstVerify(typeof(RefX1))); + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>(new RefX2())).InstVerify(typeof(RefX2))); + Eval((new Gen>(new RefX3())).InstVerify(typeof(RefX3))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>>>(new RefX1>>())).InstVerify(typeof(RefX1>>))); + Eval((new Gen>>>>(new RefX1>>>())).InstVerify(typeof(RefX1>>>))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen, RefX3>>>, RefX2, RefX3>>>>>(new RefX2, RefX3>>>, RefX2, RefX3>>>>())).InstVerify(typeof(RefX2, RefX3>>>, RefX2, RefX3>>>>))); + Eval((new Gen, RefX2, RefX3>>(new RefX3, RefX2, RefX3>())).InstVerify(typeof(RefX3, RefX2, RefX3>))); + + Eval((new Gen>(new ValX1())).InstVerify(typeof(ValX1))); + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>(new ValX2())).InstVerify(typeof(ValX2))); + Eval((new Gen>(new ValX3())).InstVerify(typeof(ValX3))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>>>(new ValX1>>())).InstVerify(typeof(ValX1>>))); + Eval((new Gen>>>>(new ValX1>>>())).InstVerify(typeof(ValX1>>>))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen, ValX3>>>, ValX2, ValX3>>>>>(new ValX2, ValX3>>>, ValX2, ValX3>>>>())).InstVerify(typeof(ValX2, ValX3>>>, ValX2, ValX3>>>>))); + Eval((new Gen, ValX2, ValX3>>(new ValX3, ValX2, ValX3>())).InstVerify(typeof(ValX3, ValX2, ValX3>))); + + + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Classes/class02.cs b/tests/src/JIT/Generics/Instantiation/Classes/class02.cs new file mode 100644 index 0000000..62ffa41 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/class02.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public T Fld1; + public U Fld2; + + public Gen(T fld1, U fld2) + { + Fld1 = fld1; + Fld2 = fld2; + } + + public bool InstVerify(System.Type t1, System.Type t2) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + if (!(Fld2.GetType().Equals(t2))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int(), new int())).InstVerify(typeof(int), typeof(int))); + Eval((new Gen(new int(), new double())).InstVerify(typeof(int), typeof(double))); + Eval((new Gen(new int(), "string")).InstVerify(typeof(int), typeof(string))); + Eval((new Gen(new int(), new object())).InstVerify(typeof(int), typeof(object))); + Eval((new Gen(new int(), new Guid())).InstVerify(typeof(int), typeof(Guid))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + + Eval((new Gen(new double(), new int())).InstVerify(typeof(double), typeof(int))); + Eval((new Gen(new double(), new double())).InstVerify(typeof(double), typeof(double))); + Eval((new Gen(new double(), "string")).InstVerify(typeof(double), typeof(string))); + Eval((new Gen(new double(), new object())).InstVerify(typeof(double), typeof(object))); + Eval((new Gen(new double(), new Guid())).InstVerify(typeof(double), typeof(Guid))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + + Eval((new Gen("string", new int())).InstVerify(typeof(string), typeof(int))); + Eval((new Gen("string", new double())).InstVerify(typeof(string), typeof(double))); + Eval((new Gen("string", "string")).InstVerify(typeof(string), typeof(string))); + Eval((new Gen("string", new object())).InstVerify(typeof(string), typeof(object))); + Eval((new Gen("string", new Guid())).InstVerify(typeof(string), typeof(Guid))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + + Eval((new Gen(new object(), new int())).InstVerify(typeof(object), typeof(int))); + Eval((new Gen(new object(), new double())).InstVerify(typeof(object), typeof(double))); + Eval((new Gen(new object(), "string")).InstVerify(typeof(object), typeof(string))); + Eval((new Gen(new object(), new object())).InstVerify(typeof(object), typeof(object))); + Eval((new Gen(new object(), new Guid())).InstVerify(typeof(object), typeof(Guid))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + + Eval((new Gen(new Guid(), new int())).InstVerify(typeof(Guid), typeof(int))); + Eval((new Gen(new Guid(), new double())).InstVerify(typeof(Guid), typeof(double))); + Eval((new Gen(new Guid(), "string")).InstVerify(typeof(Guid), typeof(string))); + Eval((new Gen(new Guid(), new object())).InstVerify(typeof(Guid), typeof(object))); + Eval((new Gen(new Guid(), new Guid())).InstVerify(typeof(Guid), typeof(Guid))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + + Eval((new Gen, int>(new RefX1(), new int())).InstVerify(typeof(RefX1), typeof(int))); + Eval((new Gen, double>(new RefX1(), new double())).InstVerify(typeof(RefX1), typeof(double))); + Eval((new Gen, string>(new RefX1(), "string")).InstVerify(typeof(RefX1), typeof(string))); + Eval((new Gen, object>(new RefX1(), new object())).InstVerify(typeof(RefX1), typeof(object))); + Eval((new Gen, Guid>(new RefX1(), new Guid())).InstVerify(typeof(RefX1), typeof(Guid))); + Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); + Eval((new Gen, RefX1>(new RefX1(), new RefX1())).InstVerify(typeof(RefX1), typeof(RefX1))); + Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); + Eval((new Gen, ValX1>>(new RefX1(), new ValX1>())).InstVerify(typeof(RefX1), typeof(ValX1>))); + Eval((new Gen, ValX1>(new RefX1(), new ValX1())).InstVerify(typeof(RefX1), typeof(ValX1))); + Eval((new Gen, ValX1[][, , ,][]>>(new RefX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(RefX1), typeof(ValX1[][, , ,][]>))); + + Eval((new Gen, int>(new ValX1(), new int())).InstVerify(typeof(ValX1), typeof(int))); + Eval((new Gen, double>(new ValX1(), new double())).InstVerify(typeof(ValX1), typeof(double))); + Eval((new Gen, string>(new ValX1(), "string")).InstVerify(typeof(ValX1), typeof(string))); + Eval((new Gen, object>(new ValX1(), new object())).InstVerify(typeof(ValX1), typeof(object))); + Eval((new Gen, Guid>(new ValX1(), new Guid())).InstVerify(typeof(ValX1), typeof(Guid))); + Eval((new Gen, RefX1>>(new ValX1(), new RefX1>())).InstVerify(typeof(ValX1), typeof(RefX1>))); + Eval((new Gen, RefX1>(new ValX1(), new RefX1())).InstVerify(typeof(ValX1), typeof(RefX1))); + Eval((new Gen, RefX1[][, , ,][]>>(new ValX1(), new RefX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(RefX1[][, , ,][]>))); + Eval((new Gen, ValX1>>(new ValX1(), new ValX1>())).InstVerify(typeof(ValX1), typeof(ValX1>))); + Eval((new Gen, ValX1>(new ValX1(), new ValX1())).InstVerify(typeof(ValX1), typeof(ValX1))); + Eval((new Gen, ValX1[][, , ,][]>>(new ValX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(ValX1[][, , ,][]>))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Classes/class03.cs b/tests/src/JIT/Generics/Instantiation/Classes/class03.cs new file mode 100644 index 0000000..f7f2456 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/class03.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + +public class Gen +{ + public T Fld1; + public U Fld2; + public V Fld3; + + public Gen(T fld1, U fld2, V fld3) + { + Fld1 = fld1; + Fld2 = fld2; + Fld3 = fld3; + } + + public bool InstVerify(System.Type t1, System.Type t2, System.Type t3) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + if (!(Fld2.GetType().Equals(t2))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); + } + + if (!(Fld3.GetType().Equals(t3))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld3 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int(), new double(), new Guid())).InstVerify(typeof(int), typeof(double), typeof(Guid))); + Eval((new Gen(new double(), new Guid(), "string")).InstVerify(typeof(double), typeof(Guid), typeof(string))); + Eval((new Gen(new Guid(), "string", new object())).InstVerify(typeof(Guid), typeof(string), typeof(object))); + Eval((new Gen("string", new object(), new int[1])).InstVerify(typeof(string), typeof(object), typeof(int[]))); + Eval((new Gen>>(new object(), new int[1], new RefX1>())).InstVerify(typeof(object), typeof(int[]), typeof(RefX1>))); + Eval((new Gen>, ValX1>>(new int[1], new RefX1>(), new ValX1>())).InstVerify(typeof(int[]), typeof(RefX1>), typeof(ValX1>))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Classes/cs_template.proj b/tests/src/JIT/Generics/Instantiation/Classes/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/Instantiation/Classes/packages.config b/tests/src/JIT/Generics/Instantiation/Classes/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Classes/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/Class01.cs b/tests/src/JIT/Generics/Instantiation/Interfaces/Class01.cs new file mode 100644 index 0000000..3ad03f5 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/Class01.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface IGen +{ + void _Init(T fld1); + bool InstVerify(System.Type t1); +} + +public interface IGenSub : IGen { } + +public class GenInt : IGenSub +{ + int Fld1; + + public void _Init(int fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenDouble : IGen +{ + double Fld1; + + public void _Init(double fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenString : IGen +{ + string Fld1; + + public void _Init(string fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenObject : IGen +{ + object Fld1; + + public void _Init(object fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenGuid : IGen +{ + Guid Fld1; + + public void _Init(Guid fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenConstructedReference : IGen> +{ + RefX1 Fld1; + + public void _Init(RefX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + +public class GenConstructedValue : IGen> +{ + ValX1 Fld1; + + public void _Init(ValX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + + +public class Gen1DIntArray : IGen +{ + int[] Fld1; + + public void _Init(int[] fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class Gen2DStringArray : IGen +{ + string[,] Fld1; + + public void _Init(string[,] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenJaggedObjectArray : IGen +{ + object[][] Fld1; + + public void _Init(object[][] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + IGen IGenInt = new GenInt(); + IGenInt._Init(new int()); + Eval(IGenInt.InstVerify(typeof(int))); + + IGen IGenDouble = new GenDouble(); + IGenDouble._Init(new double()); + Eval(IGenDouble.InstVerify(typeof(double))); + + IGen IGenString = new GenString(); + IGenString._Init("string"); + Eval(IGenString.InstVerify(typeof(string))); + + IGen IGenObject = new GenObject(); + IGenObject._Init(new object()); + Eval(IGenObject.InstVerify(typeof(object))); + + IGen IGenGuid = new GenGuid(); + IGenGuid._Init(new Guid()); + Eval(IGenGuid.InstVerify(typeof(Guid))); + + IGen> IGenConstructedReference = new GenConstructedReference(); + IGenConstructedReference._Init(new RefX1()); + Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); + + IGen> IGenConstructedValue = new GenConstructedValue(); + IGenConstructedValue._Init(new ValX1()); + Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); + + IGen IGen1DIntArray = new Gen1DIntArray(); + IGen1DIntArray._Init(new int[1]); + Eval(IGen1DIntArray.InstVerify(typeof(int[]))); + + IGen IGen2DStringArray = new Gen2DStringArray(); + IGen2DStringArray._Init(new string[1, 1]); + Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); + + IGen IGenJaggedObjectArray = new GenJaggedObjectArray(); + IGenJaggedObjectArray._Init(new object[1][]); + Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/Class02.cs b/tests/src/JIT/Generics/Instantiation/Interfaces/Class02.cs new file mode 100644 index 0000000..c5c9b74 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/Class02.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface IGen +{ + bool InstVerify(System.Type t1); +} + +public class Gen : IGen +{ + public T Fld1; + + public Gen(T fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + IGen IGenInt = new Gen(new int()); + Eval(IGenInt.InstVerify(typeof(int))); + + IGen IGenDouble = new Gen(new double()); + Eval(IGenDouble.InstVerify(typeof(double))); + + IGen IGenString = new Gen("string"); + Eval(IGenString.InstVerify(typeof(string))); + + IGen IGenObject = new Gen(new object()); + Eval(IGenObject.InstVerify(typeof(object))); + + IGen IGenGuid = new Gen(new Guid()); + Eval(IGenGuid.InstVerify(typeof(Guid))); + + IGen> IGenConstructedReference = new Gen>(new RefX1()); + Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); + + IGen> IGenConstructedValue = new Gen>(new ValX1()); + Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); + + IGen IGen1DIntArray = new Gen(new int[1]); + Eval(IGen1DIntArray.InstVerify(typeof(int[]))); + + IGen IGen2DStringArray = new Gen(new string[1, 1]); + Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); + + IGen IGenJaggedObjectArray = new Gen(new object[1][]); + Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/Class03.cs b/tests/src/JIT/Generics/Instantiation/Interfaces/Class03.cs new file mode 100644 index 0000000..3cfd834 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/Class03.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface IGen +{ + bool InstVerify(System.Type t1); +} + +public interface IGenSub : IGen { } + +public class Gen : IGenSub +{ + public T Fld1; + + public Gen(T fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + IGen IGenInt = new Gen(new int()); + Eval(IGenInt.InstVerify(typeof(int))); + + IGen IGenDouble = new Gen(new double()); + Eval(IGenDouble.InstVerify(typeof(double))); + + IGen IGenString = new Gen("string"); + Eval(IGenString.InstVerify(typeof(string))); + + IGen IGenObject = new Gen(new object()); + Eval(IGenObject.InstVerify(typeof(object))); + + IGen IGenGuid = new Gen(new Guid()); + Eval(IGenGuid.InstVerify(typeof(Guid))); + + IGen> IGenConstructedReference = new Gen>(new RefX1()); + Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); + + IGen> IGenConstructedValue = new Gen>(new ValX1()); + Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); + + IGen IGen1DIntArray = new Gen(new int[1]); + Eval(IGen1DIntArray.InstVerify(typeof(int[]))); + + IGen IGen2DStringArray = new Gen(new string[1, 1]); + Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); + + IGen IGenJaggedObjectArray = new Gen(new object[1][]); + Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/Class04.cs b/tests/src/JIT/Generics/Instantiation/Interfaces/Class04.cs new file mode 100644 index 0000000..97e7de4 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/Class04.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface IGen +{ + void _Init(T fld1); + bool InstVerify(System.Type t1); +} + +public interface IGenSub : IGen { } + +public class GenInt : IGenSub +{ + int Fld1; + + public void _Init(int fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenDouble : IGenSub +{ + double Fld1; + + public void _Init(double fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenString : IGenSub +{ + string Fld1; + + public void _Init(string fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenObject : IGenSub +{ + object Fld1; + + public void _Init(object fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenGuid : IGenSub +{ + Guid Fld1; + + public void _Init(Guid fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenConstructedReference : IGenSub> +{ + RefX1 Fld1; + + public void _Init(RefX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + +public class GenConstructedValue : IGenSub> +{ + ValX1 Fld1; + + public void _Init(ValX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + + +public class Gen1DIntArray : IGenSub +{ + int[] Fld1; + + public void _Init(int[] fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class Gen2DStringArray : IGenSub +{ + string[,] Fld1; + + public void _Init(string[,] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenJaggedObjectArray : IGenSub +{ + object[][] Fld1; + + public void _Init(object[][] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + IGen IGenInt = new GenInt(); + IGenInt._Init(new int()); + Eval(IGenInt.InstVerify(typeof(int))); + + IGen IGenDouble = new GenDouble(); + IGenDouble._Init(new double()); + Eval(IGenDouble.InstVerify(typeof(double))); + + IGen IGenString = new GenString(); + IGenString._Init("string"); + Eval(IGenString.InstVerify(typeof(string))); + + IGen IGenObject = new GenObject(); + IGenObject._Init(new object()); + Eval(IGenObject.InstVerify(typeof(object))); + + IGen IGenGuid = new GenGuid(); + IGenGuid._Init(new Guid()); + Eval(IGenGuid.InstVerify(typeof(Guid))); + + IGen> IGenConstructedReference = new GenConstructedReference(); + IGenConstructedReference._Init(new RefX1()); + Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); + + IGen> IGenConstructedValue = new GenConstructedValue(); + IGenConstructedValue._Init(new ValX1()); + Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); + + IGen IGen1DIntArray = new Gen1DIntArray(); + IGen1DIntArray._Init(new int[1]); + Eval(IGen1DIntArray.InstVerify(typeof(int[]))); + + IGen IGen2DStringArray = new Gen2DStringArray(); + IGen2DStringArray._Init(new string[1, 1]); + Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); + + IGen IGenJaggedObjectArray = new GenJaggedObjectArray(); + IGenJaggedObjectArray._Init(new object[1][]); + Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/Class05.cs b/tests/src/JIT/Generics/Instantiation/Interfaces/Class05.cs new file mode 100644 index 0000000..336ad89 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/Class05.cs @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface IGen +{ + void _Init(T fld1); + bool InstVerify(System.Type t1); +} + + +public interface IGenSubInt : IGen { } +public interface IGenSubDouble : IGen { } +public interface IGenSubString : IGen { } +public interface IGenSubObject : IGen { } +public interface IGenSubGuid : IGen { } +public interface IGenSubConstructedReference : IGen> { } +public interface IGenSubConstructedValue : IGen> { } +public interface IGenSub1DIntArray : IGen { } +public interface IGenSub2DStringArray : IGen { } +public interface IGenSubJaggedObjectArray : IGen { } + + +public class GenInt : IGenSubInt +{ + int Fld1; + + public void _Init(int fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenDouble : IGenSubDouble +{ + double Fld1; + + public void _Init(double fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenString : IGenSubString +{ + string Fld1; + + public void _Init(string fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenObject : IGenSubObject +{ + object Fld1; + + public void _Init(object fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenGuid : IGenSubGuid +{ + Guid Fld1; + + public void _Init(Guid fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenConstructedReference : IGenSubConstructedReference +{ + RefX1 Fld1; + + public void _Init(RefX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + +public class GenConstructedValue : IGenSubConstructedValue +{ + ValX1 Fld1; + + public void _Init(ValX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + + +public class Gen1DIntArray : IGenSub1DIntArray +{ + int[] Fld1; + + public void _Init(int[] fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class Gen2DStringArray : IGenSub2DStringArray +{ + string[,] Fld1; + + public void _Init(string[,] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class GenJaggedObjectArray : IGenSubJaggedObjectArray +{ + object[][] Fld1; + + public void _Init(object[][] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + IGen IGenInt = new GenInt(); + IGenInt._Init(new int()); + Eval(IGenInt.InstVerify(typeof(int))); + + IGen IGenDouble = new GenDouble(); + IGenDouble._Init(new double()); + Eval(IGenDouble.InstVerify(typeof(double))); + + IGen IGenString = new GenString(); + IGenString._Init("string"); + Eval(IGenString.InstVerify(typeof(string))); + + IGen IGenObject = new GenObject(); + IGenObject._Init(new object()); + Eval(IGenObject.InstVerify(typeof(object))); + + IGen IGenGuid = new GenGuid(); + IGenGuid._Init(new Guid()); + Eval(IGenGuid.InstVerify(typeof(Guid))); + + IGen> IGenConstructedReference = new GenConstructedReference(); + IGenConstructedReference._Init(new RefX1()); + Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); + + IGen> IGenConstructedValue = new GenConstructedValue(); + IGenConstructedValue._Init(new ValX1()); + Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); + + IGen IGen1DIntArray = new Gen1DIntArray(); + IGen1DIntArray._Init(new int[1]); + Eval(IGen1DIntArray.InstVerify(typeof(int[]))); + + IGen IGen2DStringArray = new Gen2DStringArray(); + IGen2DStringArray._Init(new string[1, 1]); + Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); + + IGen IGenJaggedObjectArray = new GenJaggedObjectArray(); + IGenJaggedObjectArray._Init(new object[1][]); + Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/Interfaces.csproj b/tests/src/JIT/Generics/Instantiation/Interfaces/Interfaces.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/Interfaces.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/Struct01.cs b/tests/src/JIT/Generics/Instantiation/Interfaces/Struct01.cs new file mode 100644 index 0000000..f87984c --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/Struct01.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface IGen +{ + void _Init(T fld1); + bool InstVerify(System.Type t1); +} + +public interface IGenSub : IGen { } + +public struct GenInt : IGenSub +{ + int Fld1; + + public void _Init(int fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenDouble : IGen +{ + double Fld1; + + public void _Init(double fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenString : IGen +{ + string Fld1; + + public void _Init(string fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenObject : IGen +{ + object Fld1; + + public void _Init(object fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenGuid : IGen +{ + Guid Fld1; + + public void _Init(Guid fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenConstructedReference : IGen> +{ + RefX1 Fld1; + + public void _Init(RefX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + +public struct GenConstructedValue : IGen> +{ + ValX1 Fld1; + + public void _Init(ValX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + + +public struct Gen1DIntArray : IGen +{ + int[] Fld1; + + public void _Init(int[] fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct Gen2DStringArray : IGen +{ + string[,] Fld1; + + public void _Init(string[,] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenJaggedObjectArray : IGen +{ + object[][] Fld1; + + public void _Init(object[][] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + IGen IGenInt = new GenInt(); + IGenInt._Init(new int()); + Eval(IGenInt.InstVerify(typeof(int))); + + IGen IGenDouble = new GenDouble(); + IGenDouble._Init(new double()); + Eval(IGenDouble.InstVerify(typeof(double))); + + IGen IGenString = new GenString(); + IGenString._Init("string"); + Eval(IGenString.InstVerify(typeof(string))); + + IGen IGenObject = new GenObject(); + IGenObject._Init(new object()); + Eval(IGenObject.InstVerify(typeof(object))); + + IGen IGenGuid = new GenGuid(); + IGenGuid._Init(new Guid()); + Eval(IGenGuid.InstVerify(typeof(Guid))); + + IGen> IGenConstructedReference = new GenConstructedReference(); + IGenConstructedReference._Init(new RefX1()); + Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); + + IGen> IGenConstructedValue = new GenConstructedValue(); + IGenConstructedValue._Init(new ValX1()); + Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); + + IGen IGen1DIntArray = new Gen1DIntArray(); + IGen1DIntArray._Init(new int[1]); + Eval(IGen1DIntArray.InstVerify(typeof(int[]))); + + IGen IGen2DStringArray = new Gen2DStringArray(); + IGen2DStringArray._Init(new string[1, 1]); + Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); + + IGen IGenJaggedObjectArray = new GenJaggedObjectArray(); + IGenJaggedObjectArray._Init(new object[1][]); + Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/Struct02.cs b/tests/src/JIT/Generics/Instantiation/Interfaces/Struct02.cs new file mode 100644 index 0000000..701869d --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/Struct02.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface IGen +{ + bool InstVerify(System.Type t1); +} + +public struct Gen : IGen +{ + public T Fld1; + + public Gen(T fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + IGen IGenInt = new Gen(new int()); + Eval(IGenInt.InstVerify(typeof(int))); + + IGen IGenDouble = new Gen(new double()); + Eval(IGenDouble.InstVerify(typeof(double))); + + IGen IGenString = new Gen("string"); + Eval(IGenString.InstVerify(typeof(string))); + + IGen IGenObject = new Gen(new object()); + Eval(IGenObject.InstVerify(typeof(object))); + + IGen IGenGuid = new Gen(new Guid()); + Eval(IGenGuid.InstVerify(typeof(Guid))); + + IGen> IGenConstructedReference = new Gen>(new RefX1()); + Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); + + IGen> IGenConstructedValue = new Gen>(new ValX1()); + Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); + + IGen IGen1DIntArray = new Gen(new int[1]); + Eval(IGen1DIntArray.InstVerify(typeof(int[]))); + + IGen IGen2DStringArray = new Gen(new string[1, 1]); + Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); + + IGen IGenJaggedObjectArray = new Gen(new object[1][]); + Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/Struct03.cs b/tests/src/JIT/Generics/Instantiation/Interfaces/Struct03.cs new file mode 100644 index 0000000..12a380f --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/Struct03.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface IGen +{ + bool InstVerify(System.Type t1); +} + +public interface IGenSub : IGen { } + +public struct Gen : IGenSub +{ + public T Fld1; + + public Gen(T fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGenSub)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + IGen IGenInt = new Gen(new int()); + Eval(IGenInt.InstVerify(typeof(int))); + + IGen IGenDouble = new Gen(new double()); + Eval(IGenDouble.InstVerify(typeof(double))); + + IGen IGenString = new Gen("string"); + Eval(IGenString.InstVerify(typeof(string))); + + IGen IGenObject = new Gen(new object()); + Eval(IGenObject.InstVerify(typeof(object))); + + IGen IGenGuid = new Gen(new Guid()); + Eval(IGenGuid.InstVerify(typeof(Guid))); + + IGen> IGenConstructedReference = new Gen>(new RefX1()); + Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); + + IGen> IGenConstructedValue = new Gen>(new ValX1()); + Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); + + IGen IGen1DIntArray = new Gen(new int[1]); + Eval(IGen1DIntArray.InstVerify(typeof(int[]))); + + IGen IGen2DStringArray = new Gen(new string[1, 1]); + Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); + + IGen IGenJaggedObjectArray = new Gen(new object[1][]); + Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/Struct04.cs b/tests/src/JIT/Generics/Instantiation/Interfaces/Struct04.cs new file mode 100644 index 0000000..3afa627 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/Struct04.cs @@ -0,0 +1,341 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface IGen +{ + void _Init(T fld1); + bool InstVerify(System.Type t1); +} + +public interface IGenSub : IGen { } + +public struct GenInt : IGenSub +{ + int Fld1; + + public void _Init(int fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenDouble : IGenSub +{ + double Fld1; + + public void _Init(double fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenString : IGenSub +{ + string Fld1; + + public void _Init(string fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenObject : IGenSub +{ + object Fld1; + + public void _Init(object fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenGuid : IGenSub +{ + Guid Fld1; + + public void _Init(Guid fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenConstructedReference : IGenSub> +{ + RefX1 Fld1; + + public void _Init(RefX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + +public struct GenConstructedValue : IGenSub> +{ + ValX1 Fld1; + + public void _Init(ValX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + + +public struct Gen1DIntArray : IGenSub +{ + int[] Fld1; + + public void _Init(int[] fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct Gen2DStringArray : IGenSub +{ + string[,] Fld1; + + public void _Init(string[,] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenJaggedObjectArray : IGenSub +{ + object[][] Fld1; + + public void _Init(object[][] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + + +public struct Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + IGen IGenInt = new GenInt(); + IGenInt._Init(new int()); + Eval(IGenInt.InstVerify(typeof(int))); + + IGen IGenDouble = new GenDouble(); + IGenDouble._Init(new double()); + Eval(IGenDouble.InstVerify(typeof(double))); + + IGen IGenString = new GenString(); + IGenString._Init("string"); + Eval(IGenString.InstVerify(typeof(string))); + + IGen IGenObject = new GenObject(); + IGenObject._Init(new object()); + Eval(IGenObject.InstVerify(typeof(object))); + + IGen IGenGuid = new GenGuid(); + IGenGuid._Init(new Guid()); + Eval(IGenGuid.InstVerify(typeof(Guid))); + + IGen> IGenConstructedReference = new GenConstructedReference(); + IGenConstructedReference._Init(new RefX1()); + Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); + + IGen> IGenConstructedValue = new GenConstructedValue(); + IGenConstructedValue._Init(new ValX1()); + Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); + + IGen IGen1DIntArray = new Gen1DIntArray(); + IGen1DIntArray._Init(new int[1]); + Eval(IGen1DIntArray.InstVerify(typeof(int[]))); + + IGen IGen2DStringArray = new Gen2DStringArray(); + IGen2DStringArray._Init(new string[1, 1]); + Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); + + IGen IGenJaggedObjectArray = new GenJaggedObjectArray(); + IGenJaggedObjectArray._Init(new object[1][]); + Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/Struct05.cs b/tests/src/JIT/Generics/Instantiation/Interfaces/Struct05.cs new file mode 100644 index 0000000..b3fd7d8 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/Struct05.cs @@ -0,0 +1,352 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public interface IGen +{ + void _Init(T fld1); + bool InstVerify(System.Type t1); +} + + +public interface IGenSubInt : IGen { } +public interface IGenSubDouble : IGen { } +public interface IGenSubString : IGen { } +public interface IGenSubObject : IGen { } +public interface IGenSubGuid : IGen { } +public interface IGenSubConstructedReference : IGen> { } +public interface IGenSubConstructedValue : IGen> { } +public interface IGenSub1DIntArray : IGen { } +public interface IGenSub2DStringArray : IGen { } +public interface IGenSubJaggedObjectArray : IGen { } + + +public struct GenInt : IGenSubInt +{ + int Fld1; + + public void _Init(int fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenDouble : IGenSubDouble +{ + double Fld1; + + public void _Init(double fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenString : IGenSubString +{ + string Fld1; + + public void _Init(string fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenObject : IGenSubObject +{ + object Fld1; + + public void _Init(object fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenGuid : IGenSubGuid +{ + Guid Fld1; + + public void _Init(Guid fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenConstructedReference : IGenSubConstructedReference +{ + RefX1 Fld1; + + public void _Init(RefX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + +public struct GenConstructedValue : IGenSubConstructedValue +{ + ValX1 Fld1; + + public void _Init(ValX1 fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen>)); + } + + return result; + } +} + + +public struct Gen1DIntArray : IGenSub1DIntArray +{ + int[] Fld1; + + public void _Init(int[] fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct Gen2DStringArray : IGenSub2DStringArray +{ + string[,] Fld1; + + public void _Init(string[,] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + +public struct GenJaggedObjectArray : IGenSubJaggedObjectArray +{ + object[][] Fld1; + + public void _Init(object[][] fld1) + { + Fld1 = fld1; + } + + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(IGen)); + } + + return result; + } +} + + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + IGen IGenInt = new GenInt(); + IGenInt._Init(new int()); + Eval(IGenInt.InstVerify(typeof(int))); + + IGen IGenDouble = new GenDouble(); + IGenDouble._Init(new double()); + Eval(IGenDouble.InstVerify(typeof(double))); + + IGen IGenString = new GenString(); + IGenString._Init("string"); + Eval(IGenString.InstVerify(typeof(string))); + + IGen IGenObject = new GenObject(); + IGenObject._Init(new object()); + Eval(IGenObject.InstVerify(typeof(object))); + + IGen IGenGuid = new GenGuid(); + IGenGuid._Init(new Guid()); + Eval(IGenGuid.InstVerify(typeof(Guid))); + + IGen> IGenConstructedReference = new GenConstructedReference(); + IGenConstructedReference._Init(new RefX1()); + Eval(IGenConstructedReference.InstVerify(typeof(RefX1))); + + IGen> IGenConstructedValue = new GenConstructedValue(); + IGenConstructedValue._Init(new ValX1()); + Eval(IGenConstructedValue.InstVerify(typeof(ValX1))); + + IGen IGen1DIntArray = new Gen1DIntArray(); + IGen1DIntArray._Init(new int[1]); + Eval(IGen1DIntArray.InstVerify(typeof(int[]))); + + IGen IGen2DStringArray = new Gen2DStringArray(); + IGen2DStringArray._Init(new string[1, 1]); + Eval(IGen2DStringArray.InstVerify(typeof(string[,]))); + + IGen IGenJaggedObjectArray = new GenJaggedObjectArray(); + IGenJaggedObjectArray._Init(new object[1][]); + Eval(IGenJaggedObjectArray.InstVerify(typeof(object[][]))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/app.config b/tests/src/JIT/Generics/Instantiation/Interfaces/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/cs_template.proj b/tests/src/JIT/Generics/Instantiation/Interfaces/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/Instantiation/Interfaces/packages.config b/tests/src/JIT/Generics/Instantiation/Interfaces/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Interfaces/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/Instantiation/Structs/Structs.csproj b/tests/src/JIT/Generics/Instantiation/Structs/Structs.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Structs/Structs.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/Instantiation/Structs/app.config b/tests/src/JIT/Generics/Instantiation/Structs/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Structs/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/Instantiation/Structs/cs_template.proj b/tests/src/JIT/Generics/Instantiation/Structs/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Structs/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/Instantiation/Structs/packages.config b/tests/src/JIT/Generics/Instantiation/Structs/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Structs/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/Instantiation/Structs/struct01.cs b/tests/src/JIT/Generics/Instantiation/Structs/struct01.cs new file mode 100644 index 0000000..85453c7 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Structs/struct01.cs @@ -0,0 +1,141 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + +public struct Gen +{ + public T Fld1; + + public Gen(T fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int())).InstVerify(typeof(int))); + Eval((new Gen(new double())).InstVerify(typeof(double))); + Eval((new Gen("string")).InstVerify(typeof(string))); + Eval((new Gen(new object())).InstVerify(typeof(object))); + Eval((new Gen(new Guid())).InstVerify(typeof(Guid))); + + Eval((new Gen(new int[1])).InstVerify(typeof(int[]))); + Eval((new Gen(new double[1, 1])).InstVerify(typeof(double[,]))); + Eval((new Gen(new string[1][][])).InstVerify(typeof(string[][][]))); + Eval((new Gen(new object[1, 1, 1, 1])).InstVerify(typeof(object[, , ,]))); + Eval((new Gen(new Guid[1][, , ,][])).InstVerify(typeof(Guid[][, , ,][]))); + + Eval((new Gen[]>(new RefX1[] { })).InstVerify(typeof(RefX1[]))); + Eval((new Gen[,]>(new RefX1[1, 1])).InstVerify(typeof(RefX1[,]))); + Eval((new Gen[][][]>(new RefX1[1][][])).InstVerify(typeof(RefX1[][][]))); + Eval((new Gen[, , ,]>(new RefX1[1, 1, 1, 1])).InstVerify(typeof(RefX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX1[1][, , ,][])).InstVerify(typeof(RefX1[][, , ,][]))); + + Eval((new Gen[]>(new RefX2[] { })).InstVerify(typeof(RefX2[]))); + Eval((new Gen[,]>(new RefX2[1, 1])).InstVerify(typeof(RefX2[,]))); + Eval((new Gen[][][]>(new RefX2[1][][])).InstVerify(typeof(RefX2[][][]))); + Eval((new Gen[, , ,]>(new RefX2[1, 1, 1, 1])).InstVerify(typeof(RefX2[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX2[1][, , ,][])).InstVerify(typeof(RefX2[][, , ,][]))); + + Eval((new Gen[]>(new ValX1[] { })).InstVerify(typeof(ValX1[]))); + Eval((new Gen[,]>(new ValX1[1, 1])).InstVerify(typeof(ValX1[,]))); + Eval((new Gen[][][]>(new ValX1[1][][])).InstVerify(typeof(ValX1[][][]))); + Eval((new Gen[, , ,]>(new ValX1[1, 1, 1, 1])).InstVerify(typeof(ValX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new ValX1[1][, , ,][])).InstVerify(typeof(ValX1[][, , ,][]))); + + Eval((new Gen[]>(new ValX2[] { })).InstVerify(typeof(ValX2[]))); + Eval((new Gen[,]>(new ValX2[1, 1])).InstVerify(typeof(ValX2[,]))); + Eval((new Gen[][][]>(new ValX2[1][][])).InstVerify(typeof(ValX2[][][]))); + Eval((new Gen[, , ,]>(new ValX2[1, 1, 1, 1])).InstVerify(typeof(ValX2[, , ,]))); + + Eval((new Gen[][, , ,][]>(new ValX2[1][, , ,][])).InstVerify(typeof(ValX2[][, , ,][]))); + + Eval((new Gen>(new RefX1())).InstVerify(typeof(RefX1))); + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>(new RefX2())).InstVerify(typeof(RefX2))); + Eval((new Gen>(new RefX3())).InstVerify(typeof(RefX3))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>>>(new RefX1>>())).InstVerify(typeof(RefX1>>))); + Eval((new Gen>>>>(new RefX1>>>())).InstVerify(typeof(RefX1>>>))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen, RefX3>>>, RefX2, RefX3>>>>>(new RefX2, RefX3>>>, RefX2, RefX3>>>>())).InstVerify(typeof(RefX2, RefX3>>>, RefX2, RefX3>>>>))); + Eval((new Gen, RefX2, RefX3>>(new RefX3, RefX2, RefX3>())).InstVerify(typeof(RefX3, RefX2, RefX3>))); + + Eval((new Gen>(new ValX1())).InstVerify(typeof(ValX1))); + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>(new ValX2())).InstVerify(typeof(ValX2))); + Eval((new Gen>(new ValX3())).InstVerify(typeof(ValX3))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>>>(new ValX1>>())).InstVerify(typeof(ValX1>>))); + Eval((new Gen>>>>(new ValX1>>>())).InstVerify(typeof(ValX1>>>))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen, ValX3>>>, ValX2, ValX3>>>>>(new ValX2, ValX3>>>, ValX2, ValX3>>>>())).InstVerify(typeof(ValX2, ValX3>>>, ValX2, ValX3>>>>))); + Eval((new Gen, ValX2, ValX3>>(new ValX3, ValX2, ValX3>())).InstVerify(typeof(ValX3, ValX2, ValX3>))); + + + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Structs/struct02.cs b/tests/src/JIT/Generics/Instantiation/Structs/struct02.cs new file mode 100644 index 0000000..aca8996 --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Structs/struct02.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public T Fld1; + public U Fld2; + + public Gen(T fld1, U fld2) + { + Fld1 = fld1; + Fld2 = fld2; + } + + public bool InstVerify(System.Type t1, System.Type t2) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + if (!(Fld2.GetType().Equals(t2))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int(), new int())).InstVerify(typeof(int), typeof(int))); + Eval((new Gen(new int(), new double())).InstVerify(typeof(int), typeof(double))); + Eval((new Gen(new int(), "string")).InstVerify(typeof(int), typeof(string))); + Eval((new Gen(new int(), new object())).InstVerify(typeof(int), typeof(object))); + Eval((new Gen(new int(), new Guid())).InstVerify(typeof(int), typeof(Guid))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + + Eval((new Gen(new double(), new int())).InstVerify(typeof(double), typeof(int))); + Eval((new Gen(new double(), new double())).InstVerify(typeof(double), typeof(double))); + Eval((new Gen(new double(), "string")).InstVerify(typeof(double), typeof(string))); + Eval((new Gen(new double(), new object())).InstVerify(typeof(double), typeof(object))); + Eval((new Gen(new double(), new Guid())).InstVerify(typeof(double), typeof(Guid))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + + Eval((new Gen("string", new int())).InstVerify(typeof(string), typeof(int))); + Eval((new Gen("string", new double())).InstVerify(typeof(string), typeof(double))); + Eval((new Gen("string", "string")).InstVerify(typeof(string), typeof(string))); + Eval((new Gen("string", new object())).InstVerify(typeof(string), typeof(object))); + Eval((new Gen("string", new Guid())).InstVerify(typeof(string), typeof(Guid))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + + Eval((new Gen(new object(), new int())).InstVerify(typeof(object), typeof(int))); + Eval((new Gen(new object(), new double())).InstVerify(typeof(object), typeof(double))); + Eval((new Gen(new object(), "string")).InstVerify(typeof(object), typeof(string))); + Eval((new Gen(new object(), new object())).InstVerify(typeof(object), typeof(object))); + Eval((new Gen(new object(), new Guid())).InstVerify(typeof(object), typeof(Guid))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + + Eval((new Gen(new Guid(), new int())).InstVerify(typeof(Guid), typeof(int))); + Eval((new Gen(new Guid(), new double())).InstVerify(typeof(Guid), typeof(double))); + Eval((new Gen(new Guid(), "string")).InstVerify(typeof(Guid), typeof(string))); + Eval((new Gen(new Guid(), new object())).InstVerify(typeof(Guid), typeof(object))); + Eval((new Gen(new Guid(), new Guid())).InstVerify(typeof(Guid), typeof(Guid))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + + Eval((new Gen, int>(new RefX1(), new int())).InstVerify(typeof(RefX1), typeof(int))); + Eval((new Gen, double>(new RefX1(), new double())).InstVerify(typeof(RefX1), typeof(double))); + Eval((new Gen, string>(new RefX1(), "string")).InstVerify(typeof(RefX1), typeof(string))); + Eval((new Gen, object>(new RefX1(), new object())).InstVerify(typeof(RefX1), typeof(object))); + Eval((new Gen, Guid>(new RefX1(), new Guid())).InstVerify(typeof(RefX1), typeof(Guid))); + Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); + Eval((new Gen, RefX1>(new RefX1(), new RefX1())).InstVerify(typeof(RefX1), typeof(RefX1))); + Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); + Eval((new Gen, ValX1>>(new RefX1(), new ValX1>())).InstVerify(typeof(RefX1), typeof(ValX1>))); + Eval((new Gen, ValX1>(new RefX1(), new ValX1())).InstVerify(typeof(RefX1), typeof(ValX1))); + Eval((new Gen, ValX1[][, , ,][]>>(new RefX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(RefX1), typeof(ValX1[][, , ,][]>))); + + Eval((new Gen, int>(new ValX1(), new int())).InstVerify(typeof(ValX1), typeof(int))); + Eval((new Gen, double>(new ValX1(), new double())).InstVerify(typeof(ValX1), typeof(double))); + Eval((new Gen, string>(new ValX1(), "string")).InstVerify(typeof(ValX1), typeof(string))); + Eval((new Gen, object>(new ValX1(), new object())).InstVerify(typeof(ValX1), typeof(object))); + Eval((new Gen, Guid>(new ValX1(), new Guid())).InstVerify(typeof(ValX1), typeof(Guid))); + Eval((new Gen, RefX1>>(new ValX1(), new RefX1>())).InstVerify(typeof(ValX1), typeof(RefX1>))); + Eval((new Gen, RefX1>(new ValX1(), new RefX1())).InstVerify(typeof(ValX1), typeof(RefX1))); + Eval((new Gen, RefX1[][, , ,][]>>(new ValX1(), new RefX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(RefX1[][, , ,][]>))); + Eval((new Gen, ValX1>>(new ValX1(), new ValX1>())).InstVerify(typeof(ValX1), typeof(ValX1>))); + Eval((new Gen, ValX1>(new ValX1(), new ValX1())).InstVerify(typeof(ValX1), typeof(ValX1))); + Eval((new Gen, ValX1[][, , ,][]>>(new ValX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(ValX1[][, , ,][]>))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Instantiation/Structs/struct03.cs b/tests/src/JIT/Generics/Instantiation/Structs/struct03.cs new file mode 100644 index 0000000..54e9cea --- /dev/null +++ b/tests/src/JIT/Generics/Instantiation/Structs/struct03.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + +public struct Gen +{ + public T Fld1; + public U Fld2; + public V Fld3; + + public Gen(T fld1, U fld2, V fld3) + { + Fld1 = fld1; + Fld2 = fld2; + Fld3 = fld3; + } + + public bool InstVerify(System.Type t1, System.Type t2, System.Type t3) + { + bool result = true; + + if (!(Fld1.GetType().Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + if (!(Fld2.GetType().Equals(t2))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); + } + + if (!(Fld3.GetType().Equals(t3))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld3 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int(), new double(), new Guid())).InstVerify(typeof(int), typeof(double), typeof(Guid))); + Eval((new Gen(new double(), new Guid(), "string")).InstVerify(typeof(double), typeof(Guid), typeof(string))); + Eval((new Gen(new Guid(), "string", new object())).InstVerify(typeof(Guid), typeof(string), typeof(object))); + Eval((new Gen("string", new object(), new int[1])).InstVerify(typeof(string), typeof(object), typeof(int[]))); + Eval((new Gen>>(new object(), new int[1], new RefX1>())).InstVerify(typeof(object), typeof(int[]), typeof(RefX1>))); + Eval((new Gen>, ValX1>>(new int[1], new RefX1>(), new ValX1>())).InstVerify(typeof(int[]), typeof(RefX1>), typeof(ValX1>))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/Locals.csproj b/tests/src/JIT/Generics/Locals/Locals.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/Locals/Locals.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/Locals/app.config b/tests/src/JIT/Generics/Locals/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/Locals/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/Locals/cs_template.proj b/tests/src/JIT/Generics/Locals/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/Locals/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/Locals/instance_assignment_class01.cs b/tests/src/JIT/Generics/Locals/instance_assignment_class01.cs new file mode 100644 index 0000000..b1ee7ba --- /dev/null +++ b/tests/src/JIT/Generics/Locals/instance_assignment_class01.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public T Assign(T t) + { + T Fld1 = t; + return Fld1; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 1; + Eval(new Gen().Assign(_int).Equals(_int)); + + double _double = 1; + Eval(new Gen().Assign(_double).Equals(_double)); + + string _string = "string"; + Eval(new Gen().Assign(_string).Equals(_string)); + + object _object = new object(); + Eval(new Gen().Assign(_object).Equals(_object)); + + Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Eval(new Gen().Assign(_Guid).Equals(_Guid)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/instance_assignment_struct01.cs b/tests/src/JIT/Generics/Locals/instance_assignment_struct01.cs new file mode 100644 index 0000000..a6d6786 --- /dev/null +++ b/tests/src/JIT/Generics/Locals/instance_assignment_struct01.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public T Assign(T t) + { + T Fld1 = t; + return Fld1; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 1; + Eval(new Gen().Assign(_int).Equals(_int)); + + double _double = 1; + Eval(new Gen().Assign(_double).Equals(_double)); + + string _string = "string"; + Eval(new Gen().Assign(_string).Equals(_string)); + + object _object = new object(); + Eval(new Gen().Assign(_object).Equals(_object)); + + Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Eval(new Gen().Assign(_Guid).Equals(_Guid)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/instance_equalnull_class01.cs b/tests/src/JIT/Generics/Locals/instance_equalnull_class01.cs new file mode 100644 index 0000000..6ad63ea --- /dev/null +++ b/tests/src/JIT/Generics/Locals/instance_equalnull_class01.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public bool EqualNull(T t) + { + T Fld1 = t; + return ((object)Fld1 == null); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 0; + Eval(false == new Gen().EqualNull(_int)); + + double _double = 0; + Eval(false == new Gen().EqualNull(_double)); + + Guid _Guid = new Guid(); + Eval(false == new Gen().EqualNull(_Guid)); + + string _string = "string"; + Eval(false == new Gen().EqualNull(_string)); + Eval(true == new Gen().EqualNull(null)); + + object _object = new object(); + Eval(false == new Gen().EqualNull(_string)); + Eval(true == new Gen().EqualNull(null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/instance_equalnull_struct01.cs b/tests/src/JIT/Generics/Locals/instance_equalnull_struct01.cs new file mode 100644 index 0000000..131d163 --- /dev/null +++ b/tests/src/JIT/Generics/Locals/instance_equalnull_struct01.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public bool EqualNull(T t) + { + T Fld1 = t; + return ((object)Fld1 == null); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 0; + Eval(false == new Gen().EqualNull(_int)); + + double _double = 0; + Eval(false == new Gen().EqualNull(_double)); + + Guid _Guid = new Guid(); + Eval(false == new Gen().EqualNull(_Guid)); + + string _string = "string"; + Eval(false == new Gen().EqualNull(_string)); + Eval(true == new Gen().EqualNull(null)); + + object _object = new object(); + Eval(false == new Gen().EqualNull(_string)); + Eval(true == new Gen().EqualNull(null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/instance_passing_class01.cs b/tests/src/JIT/Generics/Locals/instance_passing_class01.cs new file mode 100644 index 0000000..4097890 --- /dev/null +++ b/tests/src/JIT/Generics/Locals/instance_passing_class01.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public T PassAsIn(T t) + { + return t; + } + + public T PassAsRef(ref T t, T Fld2) + { + T temp = t; + t = Fld2; + return temp; + } + + public void PassAsOut(out T t, T Fld2) + { + t = Fld2; + } + public void PassAsParameter(T t1, T t2) + { + T Fld1 = t1; + T Fld2 = t2; + + T temp = t1; + + Test.Eval(Fld1.Equals(PassAsIn(temp))); + Test.Eval(Fld1.Equals(PassAsRef(ref temp, Fld2))); + Test.Eval(Fld2.Equals(temp)); + temp = t1; + PassAsOut(out temp, Fld2); + Test.Eval(Fld2.Equals(temp)); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = -1; + new Gen().PassAsParameter(_int1, _int2); + + double _double1 = 1; + double _double2 = -1; + new Gen().PassAsParameter(_double1, _double2); + + string _string1 = "string1"; + string _string2 = "string2"; + new Gen().PassAsParameter(_string1, _string2); + + object _object1 = (object)_string1; + object _object2 = (object)_string2; + new Gen().PassAsParameter(_object1, _object2); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); + new Gen().PassAsParameter(_Guid1, _Guid2); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/instance_passing_struct01.cs b/tests/src/JIT/Generics/Locals/instance_passing_struct01.cs new file mode 100644 index 0000000..d54a513 --- /dev/null +++ b/tests/src/JIT/Generics/Locals/instance_passing_struct01.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public T PassAsIn(T t) + { + return t; + } + + public T PassAsRef(ref T t, T Fld2) + { + T temp = t; + t = Fld2; + return temp; + } + + public void PassAsOut(out T t, T Fld2) + { + t = Fld2; + } + public void PassAsParameter(T t1, T t2) + { + T Fld1 = t1; + T Fld2 = t2; + + T temp = t1; + + Test.Eval(Fld1.Equals(PassAsIn(temp))); + Test.Eval(Fld1.Equals(PassAsRef(ref temp, Fld2))); + Test.Eval(Fld2.Equals(temp)); + temp = t1; + PassAsOut(out temp, Fld2); + Test.Eval(Fld2.Equals(temp)); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = -1; + new Gen().PassAsParameter(_int1, _int2); + + double _double1 = 1; + double _double2 = -1; + new Gen().PassAsParameter(_double1, _double2); + + string _string1 = "string1"; + string _string2 = "string2"; + new Gen().PassAsParameter(_string1, _string2); + + object _object1 = (object)_string1; + object _object2 = (object)_string2; + new Gen().PassAsParameter(_object1, _object2); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); + new Gen().PassAsParameter(_Guid1, _Guid2); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/packages.config b/tests/src/JIT/Generics/Locals/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/Locals/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/Locals/static_assignment_class01.cs b/tests/src/JIT/Generics/Locals/static_assignment_class01.cs new file mode 100644 index 0000000..656b905 --- /dev/null +++ b/tests/src/JIT/Generics/Locals/static_assignment_class01.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public static T Assign(T t) + { + T Fld1 = t; + return Fld1; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 1; + Eval(Gen.Assign(_int).Equals(_int)); + + double _double = 1; + Eval(Gen.Assign(_double).Equals(_double)); + + string _string = "string"; + Eval(Gen.Assign(_string).Equals(_string)); + + object _object = new object(); + Eval(Gen.Assign(_object).Equals(_object)); + + Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Eval(Gen.Assign(_Guid).Equals(_Guid)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/static_assignment_struct01.cs b/tests/src/JIT/Generics/Locals/static_assignment_struct01.cs new file mode 100644 index 0000000..2948a70 --- /dev/null +++ b/tests/src/JIT/Generics/Locals/static_assignment_struct01.cs @@ -0,0 +1,79 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public static T Assign(T t) + { + T Fld1 = t; + return Fld1; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 1; + Eval(Gen.Assign(_int).Equals(_int)); + + double _double = 1; + Eval(Gen.Assign(_double).Equals(_double)); + + string _string = "string"; + Eval(Gen.Assign(_string).Equals(_string)); + + object _object = new object(); + Eval(Gen.Assign(_object).Equals(_object)); + + Guid _Guid = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Eval(Gen.Assign(_Guid).Equals(_Guid)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/static_equalnull_class01.cs b/tests/src/JIT/Generics/Locals/static_equalnull_class01.cs new file mode 100644 index 0000000..7f3ece0 --- /dev/null +++ b/tests/src/JIT/Generics/Locals/static_equalnull_class01.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public static bool EqualNull(T t) + { + T Fld1 = t; + return ((object)Fld1 == null); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 0; + Eval(false == Gen.EqualNull(_int)); + + double _double = 0; + Eval(false == Gen.EqualNull(_double)); + + Guid _Guid = new Guid(); + Eval(false == Gen.EqualNull(_Guid)); + + string _string = "string"; + Eval(false == Gen.EqualNull(_string)); + Eval(true == Gen.EqualNull(null)); + + object _object = new object(); + Eval(false == Gen.EqualNull(_string)); + Eval(true == Gen.EqualNull(null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/static_equalnull_struct01.cs b/tests/src/JIT/Generics/Locals/static_equalnull_struct01.cs new file mode 100644 index 0000000..077236e --- /dev/null +++ b/tests/src/JIT/Generics/Locals/static_equalnull_struct01.cs @@ -0,0 +1,81 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public static bool EqualNull(T t) + { + T Fld1 = t; + return ((object)Fld1 == null); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 0; + Eval(false == Gen.EqualNull(_int)); + + double _double = 0; + Eval(false == Gen.EqualNull(_double)); + + Guid _Guid = new Guid(); + Eval(false == Gen.EqualNull(_Guid)); + + string _string = "string"; + Eval(false == Gen.EqualNull(_string)); + Eval(true == Gen.EqualNull(null)); + + object _object = new object(); + Eval(false == Gen.EqualNull(_string)); + Eval(true == Gen.EqualNull(null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/static_passing_class01.cs b/tests/src/JIT/Generics/Locals/static_passing_class01.cs new file mode 100644 index 0000000..7e9533c --- /dev/null +++ b/tests/src/JIT/Generics/Locals/static_passing_class01.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public static T PassAsIn(T t) + { + return t; + } + + public static T PassAsRef(ref T t, T Fld2) + { + T temp = t; + t = Fld2; + return temp; + } + + public static void PassAsOut(out T t, T Fld2) + { + t = Fld2; + } + public static void PassAsParameter(T t1, T t2) + { + T Fld1 = t1; + T Fld2 = t2; + + T temp = t1; + + Test.Eval(Fld1.Equals(PassAsIn(temp))); + Test.Eval(Fld1.Equals(PassAsRef(ref temp, Fld2))); + Test.Eval(Fld2.Equals(temp)); + temp = t1; + PassAsOut(out temp, Fld2); + Test.Eval(Fld2.Equals(temp)); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = -1; + Gen.PassAsParameter(_int1, _int2); + + double _double1 = 1; + double _double2 = -1; + Gen.PassAsParameter(_double1, _double2); + + string _string1 = "string1"; + string _string2 = "string2"; + Gen.PassAsParameter(_string1, _string2); + + object _object1 = (object)_string1; + object _object2 = (object)_string2; + Gen.PassAsParameter(_object1, _object2); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); + Gen.PassAsParameter(_Guid1, _Guid2); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Locals/static_passing_struct01.cs b/tests/src/JIT/Generics/Locals/static_passing_struct01.cs new file mode 100644 index 0000000..0fc325b --- /dev/null +++ b/tests/src/JIT/Generics/Locals/static_passing_struct01.cs @@ -0,0 +1,109 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public static T PassAsIn(T t) + { + return t; + } + + public static T PassAsRef(ref T t, T Fld2) + { + T temp = t; + t = Fld2; + return temp; + } + + public static void PassAsOut(out T t, T Fld2) + { + t = Fld2; + } + public static void PassAsParameter(T t1, T t2) + { + T Fld1 = t1; + T Fld2 = t2; + + T temp = t1; + + Test.Eval(Fld1.Equals(PassAsIn(temp))); + Test.Eval(Fld1.Equals(PassAsRef(ref temp, Fld2))); + Test.Eval(Fld2.Equals(temp)); + temp = t1; + PassAsOut(out temp, Fld2); + Test.Eval(Fld2.Equals(temp)); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = -1; + Gen.PassAsParameter(_int1, _int2); + + double _double1 = 1; + double _double2 = -1; + Gen.PassAsParameter(_double1, _double2); + + string _string1 = "string1"; + string _string2 = "string2"; + Gen.PassAsParameter(_string1, _string2); + + object _object1 = (object)_string1; + object _object2 = (object)_string2; + Gen.PassAsParameter(_object1, _object2); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); + Gen.PassAsParameter(_Guid1, _Guid2); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/MemberAccess/MemberAccess.csproj b/tests/src/JIT/Generics/MemberAccess/MemberAccess.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/MemberAccess.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/MemberAccess/app.config b/tests/src/JIT/Generics/MemberAccess/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/MemberAccess/class_instance01.cs b/tests/src/JIT/Generics/MemberAccess/class_instance01.cs new file mode 100644 index 0000000..d61e8f1 --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/class_instance01.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// +using System; + +class Gen +{ + public T Field; + + public T[] TArray; + + public T Property + { + get { return Field; } + set { Field = value; } + } + + public T this[int i] + { + get { return TArray[i]; } + set { TArray[i] = value; } + } + + public T Method(T t) + { + return t; + } + + public virtual T VMethod(T t) + { + return t; + } + +} + +public class Test +{ + public static int Main() + { + int ret = 100; + + Gen GenInt = new Gen(); + + GenInt.Field = 5; + if (GenInt.Field != 5) + { + Console.WriteLine("Failed Field Access for Gen"); + ret = 1; + } + + GenInt.Property = 10; + + if (GenInt.Property != 10) + { + Console.WriteLine("Failed Property Access for Gen"); + ret = 1; + } + + GenInt.TArray = new int[10]; + + if (GenInt.TArray.Length != 10) + { + Console.WriteLine("Failed T Array Creation for Gen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + GenInt[i] = 15; + if (GenInt[i] != 15) + { + Console.WriteLine("Failed Indexer Access for Gen"); + ret = 1; + } + } + + if (GenInt.Method(20) != 20) + { + Console.WriteLine("Failed Method Access for Gen"); + ret = 1; + } + + if (GenInt.VMethod(25) != 25) + { + Console.WriteLine("Failed Virtual Method Access for Gen"); + ret = 1; + } + + Gen GenString = new Gen(); + + GenString.Field = "Field"; + if (GenString.Field != "Field") + { + Console.WriteLine("Failed Field Access for Gen"); + ret = 1; + } + + GenString.Property = "Property"; + + if (GenString.Property != "Property") + { + Console.WriteLine("Failed Property Access for Gen"); + ret = 1; + } + + GenString.TArray = new String[10]; + + if (GenString.TArray.Length != 10) + { + Console.WriteLine("Failed T Array Creation for Gen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + GenString[i] = "ArrayString"; + if (GenString[i] != "ArrayString") + { + Console.WriteLine("Failed Indexer Access for Gen"); + ret = 1; + } + } + + if (GenString.Method("Method") != "Method") + { + Console.WriteLine("Failed Method Access for Gen"); + ret = 1; + } + + if (GenString.VMethod("VirtualMethod") != "VirtualMethod") + { + Console.WriteLine("Failed Virtual Method Access for Gen"); + ret = 1; + } + if (ret == 100) + { + Console.WriteLine("Test Passes"); + } + return ret; + + } +} diff --git a/tests/src/JIT/Generics/MemberAccess/class_static01.cs b/tests/src/JIT/Generics/MemberAccess/class_static01.cs new file mode 100644 index 0000000..ab2da5c --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/class_static01.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +class Gen +{ + static public T Field; + + static public T[] TArray; + + static public T Property + { + get { return Field; } + set { Field = value; } + } + + static public T Method(T t) + { + return t; + } +} + +public class Test +{ + public static int Main() + { + int ret = 100; + + Gen.Field = 5; + if (Gen.Field != 5) + { + Console.WriteLine("Failed Field Access for Gen"); + ret = 1; + } + + Gen.Property = 10; + + if (Gen.Property != 10) + { + Console.WriteLine("Failed Property Access for Gen"); + ret = 1; + } + + Gen.TArray = new int[10]; + + if (Gen.TArray.Length != 10) + { + Console.WriteLine("Failed T Array Creation for Gen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + Gen.TArray[i] = 15; + if (Gen.TArray[i] != 15) + { + Console.WriteLine("Failed Indexer Access for Gen"); + ret = 1; + } + } + + if (Gen.Method(20) != 20) + { + Console.WriteLine("Failed Method Access for Gen"); + ret = 1; + } + + + Gen.Field = "Field"; + if (Gen.Field != "Field") + { + Console.WriteLine("Failed Field Access for Gen"); + ret = 1; + } + + Gen.Property = "Property"; + + if (Gen.Property != "Property") + { + Console.WriteLine("Failed Property Access for Gen"); + ret = 1; + } + + Gen.TArray = new String[10]; + + if (Gen.TArray.Length != 10) + { + Console.WriteLine("Failed T Array Creation for Gen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + Gen.TArray[i] = "ArrayString"; + if (Gen.TArray[i] != "ArrayString") + { + Console.WriteLine("Failed Indexer Access for Gen"); + ret = 1; + } + } + + if (Gen.Method("Method") != "Method") + { + Console.WriteLine("Failed Method Access for Gen"); + ret = 1; + } + + return ret; + + } +} diff --git a/tests/src/JIT/Generics/MemberAccess/cs_template.proj b/tests/src/JIT/Generics/MemberAccess/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/MemberAccess/interface_class01.cs b/tests/src/JIT/Generics/MemberAccess/interface_class01.cs new file mode 100644 index 0000000..a3e060e --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/interface_class01.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +interface IGen +{ + T Property + { + get; + set; + } + + T this[int i] + { + get; + set; + } + + T Method(T t); + + T VMethod(T t); +} + +class Gen : IGen +{ + public Gen() + { + TArray = new T[10]; + } + + public T Field; + + public T[] TArray; + + public T Property + { + get { return Field; } + set { Field = value; } + } + + public T this[int i] + { + get { return TArray[i]; } + set { TArray[i] = value; } + } + + public T Method(T t) + { + return t; + } + + public virtual T VMethod(T t) + { + return t; + } + +} + +public class Test +{ + public static int Main() + { + int ret = 100; + + IGen GenInt = new Gen(); + + GenInt.Property = 10; + + if (GenInt.Property != 10) + { + Console.WriteLine("Failed Property Access for IGen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + GenInt[i] = 15; + if (GenInt[i] != 15) + { + Console.WriteLine("Failed Indexer Access for IGen"); + ret = 1; + } + } + + if (GenInt.Method(20) != 20) + { + Console.WriteLine("Failed Method Access for IGen"); + ret = 1; + } + + if (GenInt.VMethod(25) != 25) + { + Console.WriteLine("Failed Virtual Method Access for IGen"); + ret = 1; + } + + IGen GenString = new Gen(); + + GenString.Property = "Property"; + + if (GenString.Property != "Property") + { + Console.WriteLine("Failed Property Access for IGen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + GenString[i] = "ArrayString"; + if (GenString[i] != "ArrayString") + { + Console.WriteLine("Failed Indexer Access for IGen"); + ret = 1; + } + } + + if (GenString.Method("Method") != "Method") + { + Console.WriteLine("Failed Method Access for IGen"); + ret = 1; + } + + if (GenString.VMethod("VirtualMethod") != "VirtualMethod") + { + Console.WriteLine("Failed Virtual Method Access for IGen"); + ret = 1; + } + + return ret; + + } +} diff --git a/tests/src/JIT/Generics/MemberAccess/interface_class02.cs b/tests/src/JIT/Generics/MemberAccess/interface_class02.cs new file mode 100644 index 0000000..74b9874 --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/interface_class02.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +interface IGen +{ + T Property + { + get; + set; + } + + T this[int i] + { + get; + set; + } + + T Method(T t); + + T VMethod(T t); +} + +class GenInt : IGen +{ + public GenInt() + { + TArray = new int[10]; + } + + public int Field; + + public int[] TArray; + + public int Property + { + get { return Field; } + set { Field = value; } + } + + public int this[int i] + { + get { return TArray[i]; } + set { TArray[i] = value; } + } + + public int Method(int t) + { + return t; + } + + public virtual int VMethod(int t) + { + return t; + } + +} + +class GenString : IGen +{ + public GenString() + { + TArray = new string[10]; + } + + public string Field; + + public string[] TArray; + + public string Property + { + get { return Field; } + set { Field = value; } + } + + public string this[int i] + { + get { return TArray[i]; } + set { TArray[i] = value; } + } + + public string Method(string t) + { + return t; + } + + public virtual string VMethod(string t) + { + return t; + } + +} + +public class Test +{ + public static int Main() + { + int ret = 100; + + IGen Gen_Int = new GenInt(); + + Gen_Int.Property = 10; + + if (Gen_Int.Property != 10) + { + Console.WriteLine("Failed Property Access for IGen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + Gen_Int[i] = 15; + if (Gen_Int[i] != 15) + { + Console.WriteLine("Failed Indexer Access for IGen"); + ret = 1; + } + } + + if (Gen_Int.Method(20) != 20) + { + Console.WriteLine("Failed Method Access for IGen"); + ret = 1; + } + + if (Gen_Int.VMethod(25) != 25) + { + Console.WriteLine("Failed Virtual Method Access for IGen"); + ret = 1; + } + + IGen Gen_String = new GenString(); + + Gen_String.Property = "Property"; + + if (Gen_String.Property != "Property") + { + Console.WriteLine("Failed Property Access for IGen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + Gen_String[i] = "ArrayString"; + if (Gen_String[i] != "ArrayString") + { + Console.WriteLine("Failed Indexer Access for IGen"); + ret = 1; + } + } + + if (Gen_String.Method("Method") != "Method") + { + Console.WriteLine("Failed Method Access for IGen"); + ret = 1; + } + + if (Gen_String.VMethod("VirtualMethod") != "VirtualMethod") + { + Console.WriteLine("Failed Virtual Method Access for IGen"); + ret = 1; + } + + return ret; + + } +} diff --git a/tests/src/JIT/Generics/MemberAccess/interface_struct01.cs b/tests/src/JIT/Generics/MemberAccess/interface_struct01.cs new file mode 100644 index 0000000..364f322 --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/interface_struct01.cs @@ -0,0 +1,115 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +interface IGen +{ + T Property + { + get; + set; + } + + T this[int i] + { + get; + set; + } + + T Method(T t); +} + +struct Gen : IGen +{ + + public T Field; + + public T[] TArray; + + public T Property + { + get { return Field; } + set { Field = value; } + } + + public T this[int i] + { + get { return TArray[i]; } + set { TArray[i] = value; } + } + + public T Method(T t) + { + return t; + } + +} + +public class Test +{ + public static int Main() + { + int ret = 100; + + Gen GenIntStruct = new Gen(); + GenIntStruct.TArray = new int[10]; + IGen GenInt = GenIntStruct; + + GenInt.Property = 10; + + if (GenInt.Property != 10) + { + Console.WriteLine("Failed Property Access for IGen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + GenInt[i] = 15; + if (GenInt[i] != 15) + { + Console.WriteLine("Failed Indexer Access for IGen"); + ret = 1; + } + } + + if (GenInt.Method(20) != 20) + { + Console.WriteLine("Failed Method Access for IGen"); + ret = 1; + } + + Gen GenStringStruct = new Gen(); + GenStringStruct.TArray = new string[10]; + IGen GenString = GenStringStruct; + + GenString.Property = "Property"; + + if (GenString.Property != "Property") + { + Console.WriteLine("Failed Property Access for IGen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + GenString[i] = "ArrayString"; + if (GenString[i] != "ArrayString") + { + Console.WriteLine("Failed Indexer Access for IGen"); + ret = 1; + } + } + + if (GenString.Method("Method") != "Method") + { + Console.WriteLine("Failed Method Access for IGen"); + ret = 1; + } + + return ret; + + } +} diff --git a/tests/src/JIT/Generics/MemberAccess/interface_struct02.cs b/tests/src/JIT/Generics/MemberAccess/interface_struct02.cs new file mode 100644 index 0000000..3251eb5 --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/interface_struct02.cs @@ -0,0 +1,139 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +interface IGen +{ + T Property + { + get; + set; + } + + T this[int i] + { + get; + set; + } + + T Method(T t); +} + +struct GenInt : IGen +{ + public int Field; + + public int[] TArray; + + public int Property + { + get { return Field; } + set { Field = value; } + } + + public int this[int i] + { + get { return TArray[i]; } + set { TArray[i] = value; } + } + + public int Method(int t) + { + return t; + } + +} + +struct GenString : IGen +{ + public string Field; + + public string[] TArray; + + public string Property + { + get { return Field; } + set { Field = value; } + } + + public string this[int i] + { + get { return TArray[i]; } + set { TArray[i] = value; } + } + + public string Method(string t) + { + return t; + } + +} + +public class Test +{ + public static int Main() + { + int ret = 100; + + GenInt GenIntStruct = new GenInt(); + GenIntStruct.TArray = new int[10]; + IGen IGenInt = GenIntStruct; + + IGenInt.Property = 10; + + if (IGenInt.Property != 10) + { + Console.WriteLine("Failed Property Access for IGen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + IGenInt[i] = 15; + if (IGenInt[i] != 15) + { + Console.WriteLine("Failed Indexer Access for IGen"); + ret = 1; + } + } + + if (IGenInt.Method(20) != 20) + { + Console.WriteLine("Failed Method Access for IGen"); + ret = 1; + } + + GenString GenStringStruct = new GenString(); + GenStringStruct.TArray = new string[10]; + IGen IGenString = GenStringStruct; + + IGenString.Property = "Property"; + + if (IGenString.Property != "Property") + { + Console.WriteLine("Failed Property Access for IGen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + IGenString[i] = "ArrayString"; + if (IGenString[i] != "ArrayString") + { + Console.WriteLine("Failed Indexer Access for IGen"); + ret = 1; + } + } + + if (IGenString.Method("Method") != "Method") + { + Console.WriteLine("Failed Method Access for IGen"); + ret = 1; + } + + return ret; + + } +} diff --git a/tests/src/JIT/Generics/MemberAccess/packages.config b/tests/src/JIT/Generics/MemberAccess/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/MemberAccess/struct_instance01.cs b/tests/src/JIT/Generics/MemberAccess/struct_instance01.cs new file mode 100644 index 0000000..f0f10a4 --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/struct_instance01.cs @@ -0,0 +1,122 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +struct Gen +{ + public T Field; + + public T[] TArray; + + public T Property + { + get { return Field; } + set { Field = value; } + } + + public T this[int i] + { + get { return TArray[i]; } + set { TArray[i] = value; } + } + + public T Method(T t) + { + return t; + } +} + +public class Test +{ + public static int Main() + { + int ret = 100; + + Gen GenInt = new Gen(); + + GenInt.Field = 5; + if (GenInt.Field != 5) + { + Console.WriteLine("Failed Field Access for Gen"); + ret = 1; + } + + GenInt.Property = 10; + + if (GenInt.Property != 10) + { + Console.WriteLine("Failed Property Access for Gen"); + ret = 1; + } + + GenInt.TArray = new int[10]; + + if (GenInt.TArray.Length != 10) + { + Console.WriteLine("Failed T Array Creation for Gen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + GenInt[i] = 15; + if (GenInt[i] != 15) + { + Console.WriteLine("Failed Indexer Access for Gen"); + ret = 1; + } + } + + if (GenInt.Method(20) != 20) + { + Console.WriteLine("Failed Method Access for Gen"); + ret = 1; + } + + Gen GenString = new Gen(); + + GenString.Field = "Field"; + if (GenString.Field != "Field") + { + Console.WriteLine("Failed Field Access for Gen"); + ret = 1; + } + + GenString.Property = "Property"; + + if (GenString.Property != "Property") + { + Console.WriteLine("Failed Property Access for Gen"); + ret = 1; + } + + GenString.TArray = new String[10]; + + if (GenString.TArray.Length != 10) + { + Console.WriteLine("Failed T Array Creation for Gen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + GenString[i] = "ArrayString"; + if (GenString[i] != "ArrayString") + { + Console.WriteLine("Failed Indexer Access for Gen"); + ret = 1; + } + } + + if (GenString.Method("Method") != "Method") + { + Console.WriteLine("Failed Method Access for Gen"); + ret = 1; + } + + return ret; + + } +} diff --git a/tests/src/JIT/Generics/MemberAccess/struct_static01.cs b/tests/src/JIT/Generics/MemberAccess/struct_static01.cs new file mode 100644 index 0000000..9d8900b --- /dev/null +++ b/tests/src/JIT/Generics/MemberAccess/struct_static01.cs @@ -0,0 +1,113 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +struct Gen +{ + static public T Field; + + static public T[] TArray; + + static public T Property + { + get { return Field; } + set { Field = value; } + } + + static public T Method(T t) + { + return t; + } +} + +public class Test +{ + public static int Main() + { + int ret = 100; + + Gen.Field = 5; + if (Gen.Field != 5) + { + Console.WriteLine("Failed Field Access for Gen"); + ret = 1; + } + + Gen.Property = 10; + + if (Gen.Property != 10) + { + Console.WriteLine("Failed Property Access for Gen"); + ret = 1; + } + + Gen.TArray = new int[10]; + + if (Gen.TArray.Length != 10) + { + Console.WriteLine("Failed T Array Creation for Gen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + Gen.TArray[i] = 15; + if (Gen.TArray[i] != 15) + { + Console.WriteLine("Failed Indexer Access for Gen"); + ret = 1; + } + } + + if (Gen.Method(20) != 20) + { + Console.WriteLine("Failed Method Access for Gen"); + ret = 1; + } + + + Gen.Field = "Field"; + if (Gen.Field != "Field") + { + Console.WriteLine("Failed Field Access for Gen"); + ret = 1; + } + + Gen.Property = "Property"; + + if (Gen.Property != "Property") + { + Console.WriteLine("Failed Property Access for Gen"); + ret = 1; + } + + Gen.TArray = new String[10]; + + if (Gen.TArray.Length != 10) + { + Console.WriteLine("Failed T Array Creation for Gen"); + ret = 1; + } + + for (int i = 0; (i < 10); i++) + { + Gen.TArray[i] = "ArrayString"; + if (Gen.TArray[i] != "ArrayString") + { + Console.WriteLine("Failed Indexer Access for Gen"); + ret = 1; + } + } + + if (Gen.Method("Method") != "Method") + { + Console.WriteLine("Failed Method Access for Gen"); + ret = 1; + } + + return ret; + + } +} diff --git a/tests/src/JIT/Generics/Parameters/Parameters.csproj b/tests/src/JIT/Generics/Parameters/Parameters.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/Parameters.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/Parameters/app.config b/tests/src/JIT/Generics/Parameters/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/Parameters/cs_template.proj b/tests/src/JIT/Generics/Parameters/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/Parameters/instance_assignment_class01.cs b/tests/src/JIT/Generics/Parameters/instance_assignment_class01.cs new file mode 100644 index 0000000..c9f5348 --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/instance_assignment_class01.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public void AssignRef(T tin, ref T tref) + { + tref = tin; + } + + public void AssignOut(T tin, out T tout) + { + tout = tin; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = 2; + new Gen().AssignRef(_int1, ref _int2); + Eval(_int1.Equals(_int2)); + _int2 = 2; + new Gen().AssignOut(_int1, out _int2); + Eval(_int1.Equals(_int2)); + + double _double1 = 1; + double _double2 = 2; + new Gen().AssignRef(_double1, ref _double2); + Eval(_double1.Equals(_double2)); + _double2 = 2; + new Gen().AssignOut(_double1, out _double2); + Eval(_double1.Equals(_double2)); + + string _string1 = "string1"; + string _string2 = "string2"; + new Gen().AssignRef(_string1, ref _string2); + Eval(_string1.Equals(_string2)); + _string2 = "string2"; + new Gen().AssignOut(_string1, out _string2); + Eval(_string1.Equals(_string2)); + + object _object1 = (object)_int1; + object _object2 = (object)_string2; + new Gen().AssignRef(_object1, ref _object2); + Eval(_object1.Equals(_object2)); + _object2 = (object)_string2; + new Gen().AssignOut(_object1, out _object2); + Eval(_object1.Equals(_object2)); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); + new Gen().AssignRef(_Guid1, ref _Guid2); + Eval(_Guid1.Equals(_Guid2)); + _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); + new Gen().AssignOut(_Guid1, out _Guid2); + Eval(_Guid1.Equals(_Guid2)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Parameters/instance_assignment_struct01.cs b/tests/src/JIT/Generics/Parameters/instance_assignment_struct01.cs new file mode 100644 index 0000000..d8446ec --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/instance_assignment_struct01.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public void AssignRef(T tin, ref T tref) + { + tref = tin; + } + + public void AssignOut(T tin, out T tout) + { + tout = tin; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = 2; + new Gen().AssignRef(_int1, ref _int2); + Eval(_int1.Equals(_int2)); + _int2 = 2; + new Gen().AssignOut(_int1, out _int2); + Eval(_int1.Equals(_int2)); + + double _double1 = 1; + double _double2 = 2; + new Gen().AssignRef(_double1, ref _double2); + Eval(_double1.Equals(_double2)); + _double2 = 2; + new Gen().AssignOut(_double1, out _double2); + Eval(_double1.Equals(_double2)); + + string _string1 = "string1"; + string _string2 = "string2"; + new Gen().AssignRef(_string1, ref _string2); + Eval(_string1.Equals(_string2)); + _string2 = "string2"; + new Gen().AssignOut(_string1, out _string2); + Eval(_string1.Equals(_string2)); + + object _object1 = (object)_int1; + object _object2 = (object)_string2; + new Gen().AssignRef(_object1, ref _object2); + Eval(_object1.Equals(_object2)); + _object2 = (object)_string2; + new Gen().AssignOut(_object1, out _object2); + Eval(_object1.Equals(_object2)); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); + new Gen().AssignRef(_Guid1, ref _Guid2); + Eval(_Guid1.Equals(_Guid2)); + _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); + new Gen().AssignOut(_Guid1, out _Guid2); + Eval(_Guid1.Equals(_Guid2)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Parameters/instance_equalnull_class01.cs b/tests/src/JIT/Generics/Parameters/instance_equalnull_class01.cs new file mode 100644 index 0000000..91dd240 --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/instance_equalnull_class01.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public bool EqualNull(T t) + { + return ((object)t == null); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 0; + Eval(false == new Gen().EqualNull(_int)); + + double _double = 0; + Eval(false == new Gen().EqualNull(_double)); + + Guid _Guid = new Guid(); + Eval(false == new Gen().EqualNull(_Guid)); + + string _string = "string"; + Eval(false == new Gen().EqualNull(_string)); + Eval(true == new Gen().EqualNull(null)); + + object _object = new object(); + Eval(false == new Gen().EqualNull(_string)); + Eval(true == new Gen().EqualNull(null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Parameters/instance_equalnull_struct01.cs b/tests/src/JIT/Generics/Parameters/instance_equalnull_struct01.cs new file mode 100644 index 0000000..0a43ddd --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/instance_equalnull_struct01.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public bool EqualNull(T t) + { + return ((object)t == null); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 0; + Eval(false == new Gen().EqualNull(_int)); + + double _double = 0; + Eval(false == new Gen().EqualNull(_double)); + + Guid _Guid = new Guid(); + Eval(false == new Gen().EqualNull(_Guid)); + + string _string = "string"; + Eval(false == new Gen().EqualNull(_string)); + Eval(true == new Gen().EqualNull(null)); + + object _object = new object(); + Eval(false == new Gen().EqualNull(_string)); + Eval(true == new Gen().EqualNull(null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Parameters/instance_passing_class01.cs b/tests/src/JIT/Generics/Parameters/instance_passing_class01.cs new file mode 100644 index 0000000..b98caad --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/instance_passing_class01.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public T PassAsIn(T t) + { + return t; + } + + public T PassAsRef(ref T t, T Fld2) + { + T temp = t; + t = Fld2; + return temp; + } + + public void PassAsOut(out T t, T Fld2) + { + t = Fld2; + } + public void PassAsParameter(T t1, T t2) + { + T temp = t1; + + Test.Eval(t1.Equals(PassAsIn(temp))); + Test.Eval(t1.Equals(PassAsRef(ref temp, t2))); + Test.Eval(t2.Equals(temp)); + temp = t1; + PassAsOut(out temp, t2); + Test.Eval(t2.Equals(temp)); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = -1; + new Gen().PassAsParameter(_int1, _int2); + + double _double1 = 1; + double _double2 = -1; + new Gen().PassAsParameter(_double1, _double2); + + string _string1 = "string1"; + string _string2 = "string2"; + new Gen().PassAsParameter(_string1, _string2); + + object _object1 = (object)_string1; + object _object2 = (object)_string2; + new Gen().PassAsParameter(_object1, _object2); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); + new Gen().PassAsParameter(_Guid1, _Guid2); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Parameters/instance_passing_struct01.cs b/tests/src/JIT/Generics/Parameters/instance_passing_struct01.cs new file mode 100644 index 0000000..b340d0b --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/instance_passing_struct01.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public T PassAsIn(T t) + { + return t; + } + + public T PassAsRef(ref T t, T Fld2) + { + T temp = t; + t = Fld2; + return temp; + } + + public void PassAsOut(out T t, T Fld2) + { + t = Fld2; + } + public void PassAsParameter(T t1, T t2) + { + T temp = t1; + + Test.Eval(t1.Equals(PassAsIn(temp))); + Test.Eval(t1.Equals(PassAsRef(ref temp, t2))); + Test.Eval(t2.Equals(temp)); + temp = t1; + PassAsOut(out temp, t2); + Test.Eval(t2.Equals(temp)); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = -1; + new Gen().PassAsParameter(_int1, _int2); + + double _double1 = 1; + double _double2 = -1; + new Gen().PassAsParameter(_double1, _double2); + + string _string1 = "string1"; + string _string2 = "string2"; + new Gen().PassAsParameter(_string1, _string2); + + object _object1 = (object)_string1; + object _object2 = (object)_string2; + new Gen().PassAsParameter(_object1, _object2); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); + new Gen().PassAsParameter(_Guid1, _Guid2); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Parameters/packages.config b/tests/src/JIT/Generics/Parameters/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/Parameters/static_assignment_class01.cs b/tests/src/JIT/Generics/Parameters/static_assignment_class01.cs new file mode 100644 index 0000000..c1e00fd --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/static_assignment_class01.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public static void AssignRef(T tin, ref T tref) + { + tref = tin; + } + + public static void AssignOut(T tin, out T tout) + { + tout = tin; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = 2; + Gen.AssignRef(_int1, ref _int2); + Eval(_int1.Equals(_int2)); + _int2 = 2; + Gen.AssignOut(_int1, out _int2); + Eval(_int1.Equals(_int2)); + + double _double1 = 1; + double _double2 = 2; + Gen.AssignRef(_double1, ref _double2); + Eval(_double1.Equals(_double2)); + _double2 = 2; + Gen.AssignOut(_double1, out _double2); + Eval(_double1.Equals(_double2)); + + string _string1 = "string1"; + string _string2 = "string2"; + Gen.AssignRef(_string1, ref _string2); + Eval(_string1.Equals(_string2)); + _string2 = "string2"; + Gen.AssignOut(_string1, out _string2); + Eval(_string1.Equals(_string2)); + + object _object1 = (object)_int1; + object _object2 = (object)_string2; + Gen.AssignRef(_object1, ref _object2); + Eval(_object1.Equals(_object2)); + _object2 = (object)_string2; + Gen.AssignOut(_object1, out _object2); + Eval(_object1.Equals(_object2)); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); + Gen.AssignRef(_Guid1, ref _Guid2); + Eval(_Guid1.Equals(_Guid2)); + _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); + Gen.AssignOut(_Guid1, out _Guid2); + Eval(_Guid1.Equals(_Guid2)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Parameters/static_assignment_struct01.cs b/tests/src/JIT/Generics/Parameters/static_assignment_struct01.cs new file mode 100644 index 0000000..244b246 --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/static_assignment_struct01.cs @@ -0,0 +1,108 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public static void AssignRef(T tin, ref T tref) + { + tref = tin; + } + + public static void AssignOut(T tin, out T tout) + { + tout = tin; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = 2; + Gen.AssignRef(_int1, ref _int2); + Eval(_int1.Equals(_int2)); + _int2 = 2; + Gen.AssignOut(_int1, out _int2); + Eval(_int1.Equals(_int2)); + + double _double1 = 1; + double _double2 = 2; + Gen.AssignRef(_double1, ref _double2); + Eval(_double1.Equals(_double2)); + _double2 = 2; + Gen.AssignOut(_double1, out _double2); + Eval(_double1.Equals(_double2)); + + string _string1 = "string1"; + string _string2 = "string2"; + Gen.AssignRef(_string1, ref _string2); + Eval(_string1.Equals(_string2)); + _string2 = "string2"; + Gen.AssignOut(_string1, out _string2); + Eval(_string1.Equals(_string2)); + + object _object1 = (object)_int1; + object _object2 = (object)_string2; + Gen.AssignRef(_object1, ref _object2); + Eval(_object1.Equals(_object2)); + _object2 = (object)_string2; + Gen.AssignOut(_object1, out _object2); + Eval(_object1.Equals(_object2)); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); + Gen.AssignRef(_Guid1, ref _Guid2); + Eval(_Guid1.Equals(_Guid2)); + _Guid2 = new Guid(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12); + Gen.AssignOut(_Guid1, out _Guid2); + Eval(_Guid1.Equals(_Guid2)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Parameters/static_equalnull_class01.cs b/tests/src/JIT/Generics/Parameters/static_equalnull_class01.cs new file mode 100644 index 0000000..bc6886d --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/static_equalnull_class01.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public static bool EqualNull(T t) + { + return ((object)t == null); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 0; + Eval(false == Gen.EqualNull(_int)); + + double _double = 0; + Eval(false == Gen.EqualNull(_double)); + + Guid _Guid = new Guid(); + Eval(false == Gen.EqualNull(_Guid)); + + string _string = "string"; + Eval(false == Gen.EqualNull(_string)); + Eval(true == Gen.EqualNull(null)); + + object _object = new object(); + Eval(false == Gen.EqualNull(_string)); + Eval(true == Gen.EqualNull(null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Parameters/static_equalnull_struct01.cs b/tests/src/JIT/Generics/Parameters/static_equalnull_struct01.cs new file mode 100644 index 0000000..9de7184 --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/static_equalnull_struct01.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public static bool EqualNull(T t) + { + return ((object)t == null); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int = 0; + Eval(false == Gen.EqualNull(_int)); + + double _double = 0; + Eval(false == Gen.EqualNull(_double)); + + Guid _Guid = new Guid(); + Eval(false == Gen.EqualNull(_Guid)); + + string _string = "string"; + Eval(false == Gen.EqualNull(_string)); + Eval(true == Gen.EqualNull(null)); + + object _object = new object(); + Eval(false == Gen.EqualNull(_string)); + Eval(true == Gen.EqualNull(null)); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Parameters/static_passing_class01.cs b/tests/src/JIT/Generics/Parameters/static_passing_class01.cs new file mode 100644 index 0000000..56f33e3 --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/static_passing_class01.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public static T PassAsIn(T t) + { + return t; + } + + public static T PassAsRef(ref T t, T Fld2) + { + T temp = t; + t = Fld2; + return temp; + } + + public static void PassAsOut(out T t, T Fld2) + { + t = Fld2; + } + public static void PassAsParameter(T t1, T t2) + { + T temp = t1; + + Test.Eval(t1.Equals(PassAsIn(temp))); + Test.Eval(t1.Equals(PassAsRef(ref temp, t2))); + Test.Eval(t2.Equals(temp)); + temp = t1; + PassAsOut(out temp, t2); + Test.Eval(t2.Equals(temp)); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = -1; + Gen.PassAsParameter(_int1, _int2); + + double _double1 = 1; + double _double2 = -1; + Gen.PassAsParameter(_double1, _double2); + + string _string1 = "string1"; + string _string2 = "string2"; + Gen.PassAsParameter(_string1, _string2); + + object _object1 = (object)_string1; + object _object2 = (object)_string2; + Gen.PassAsParameter(_object1, _object2); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); + Gen.PassAsParameter(_Guid1, _Guid2); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Parameters/static_passing_struct01.cs b/tests/src/JIT/Generics/Parameters/static_passing_struct01.cs new file mode 100644 index 0000000..3d3a410 --- /dev/null +++ b/tests/src/JIT/Generics/Parameters/static_passing_struct01.cs @@ -0,0 +1,106 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public static T PassAsIn(T t) + { + return t; + } + + public static T PassAsRef(ref T t, T Fld2) + { + T temp = t; + t = Fld2; + return temp; + } + + public static void PassAsOut(out T t, T Fld2) + { + t = Fld2; + } + public static void PassAsParameter(T t1, T t2) + { + T temp = t1; + + Test.Eval(t1.Equals(PassAsIn(temp))); + Test.Eval(t1.Equals(PassAsRef(ref temp, t2))); + Test.Eval(t2.Equals(temp)); + temp = t1; + PassAsOut(out temp, t2); + Test.Eval(t2.Equals(temp)); + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + + int _int1 = 1; + int _int2 = -1; + Gen.PassAsParameter(_int1, _int2); + + double _double1 = 1; + double _double2 = -1; + Gen.PassAsParameter(_double1, _double2); + + string _string1 = "string1"; + string _string2 = "string2"; + Gen.PassAsParameter(_string1, _string2); + + object _object1 = (object)_string1; + object _object2 = (object)_string2; + Gen.PassAsParameter(_object1, _object2); + + Guid _Guid1 = new Guid(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1); + Guid _Guid2 = new Guid(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11); + Gen.PassAsParameter(_Guid1, _Guid2); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/TypeParameters/TypeParameters.csproj b/tests/src/JIT/Generics/TypeParameters/TypeParameters.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/TypeParameters/TypeParameters.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/TypeParameters/app.config b/tests/src/JIT/Generics/TypeParameters/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/TypeParameters/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/TypeParameters/cs_template.proj b/tests/src/JIT/Generics/TypeParameters/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/TypeParameters/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/TypeParameters/default_class01.cs b/tests/src/JIT/Generics/TypeParameters/default_class01.cs new file mode 100644 index 0000000..51825fd --- /dev/null +++ b/tests/src/JIT/Generics/TypeParameters/default_class01.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public bool DefaultTest(bool status) + { + bool result = true; + T t = default(T); + + if (((object)t == null) != status) + { + result = false; + Console.WriteLine("default(T) Failed for" + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Gen().DefaultTest(false)); + Eval(new Gen().DefaultTest(false)); + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(false)); + + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(true)); + + Eval(new Gen[]>().DefaultTest(true)); + Eval(new Gen[,]>().DefaultTest(true)); + Eval(new Gen[][][]>().DefaultTest(true)); + Eval(new Gen[, , ,]>().DefaultTest(true)); + Eval(new Gen[][, , ,][]>().DefaultTest(true)); + Eval(new Gen[]>().DefaultTest(true)); + Eval(new Gen[,]>().DefaultTest(true)); + Eval(new Gen[][][]>().DefaultTest(true)); + Eval(new Gen[, , ,]>().DefaultTest(true)); + Eval(new Gen[][, , ,][]>().DefaultTest(true)); + + Eval(new Gen[]>().DefaultTest(true)); + Eval(new Gen[,]>().DefaultTest(true)); + Eval(new Gen[][][]>().DefaultTest(true)); + Eval(new Gen[, , ,]>().DefaultTest(true)); + Eval(new Gen[][, , ,][]>().DefaultTest(true)); + + Eval(new Gen[]>().DefaultTest(true)); + Eval(new Gen[,]>().DefaultTest(true)); + Eval(new Gen[][][]>().DefaultTest(true)); + Eval(new Gen[, , ,]>().DefaultTest(true)); + Eval(new Gen[][, , ,][]>().DefaultTest(true)); + + Eval(new Gen>().DefaultTest(true)); + Eval(new Gen>>().DefaultTest(true)); + Eval(new Gen>().DefaultTest(true)); + Eval(new Gen>().DefaultTest(true)); + + Eval(new Gen>>().DefaultTest(true)); + Eval(new Gen>>>().DefaultTest(true)); + Eval(new Gen>>>>().DefaultTest(true)); + + Eval(new Gen>>().DefaultTest(true)); + Eval(new Gen, RefX3>>>, RefX2, RefX3>>>>>().DefaultTest(true)); + Eval(new Gen, RefX2, RefX3>>().DefaultTest(true)); + + Eval(new Gen>().DefaultTest(false)); + Eval(new Gen>>().DefaultTest(false)); + Eval(new Gen>().DefaultTest(false)); + Eval(new Gen>().DefaultTest(false)); + + Eval(new Gen>>().DefaultTest(false)); + Eval(new Gen>>>().DefaultTest(false)); + Eval(new Gen>>>>().DefaultTest(false)); + + Eval(new Gen>>().DefaultTest(false)); + Eval(new Gen, ValX3>>>, ValX2, ValX3>>>>>().DefaultTest(false)); + Eval(new Gen, ValX2, ValX3>>().DefaultTest(false)); + + + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/TypeParameters/default_struct01.cs b/tests/src/JIT/Generics/TypeParameters/default_struct01.cs new file mode 100644 index 0000000..7a9174c --- /dev/null +++ b/tests/src/JIT/Generics/TypeParameters/default_struct01.cs @@ -0,0 +1,134 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public bool DefaultTest(bool status) + { + bool result = true; + T t = default(T); + + if (((object)t == null) != status) + { + result = false; + Console.WriteLine("default(T) Failed for" + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval(new Gen().DefaultTest(false)); + Eval(new Gen().DefaultTest(false)); + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(false)); + + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(true)); + Eval(new Gen().DefaultTest(true)); + + Eval(new Gen[]>().DefaultTest(true)); + Eval(new Gen[,]>().DefaultTest(true)); + Eval(new Gen[][][]>().DefaultTest(true)); + Eval(new Gen[, , ,]>().DefaultTest(true)); + Eval(new Gen[][, , ,][]>().DefaultTest(true)); + Eval(new Gen[]>().DefaultTest(true)); + Eval(new Gen[,]>().DefaultTest(true)); + Eval(new Gen[][][]>().DefaultTest(true)); + Eval(new Gen[, , ,]>().DefaultTest(true)); + Eval(new Gen[][, , ,][]>().DefaultTest(true)); + + Eval(new Gen[]>().DefaultTest(true)); + Eval(new Gen[,]>().DefaultTest(true)); + Eval(new Gen[][][]>().DefaultTest(true)); + Eval(new Gen[, , ,]>().DefaultTest(true)); + Eval(new Gen[][, , ,][]>().DefaultTest(true)); + + Eval(new Gen[]>().DefaultTest(true)); + Eval(new Gen[,]>().DefaultTest(true)); + Eval(new Gen[][][]>().DefaultTest(true)); + Eval(new Gen[, , ,]>().DefaultTest(true)); + Eval(new Gen[][, , ,][]>().DefaultTest(true)); + + Eval(new Gen>().DefaultTest(true)); + Eval(new Gen>>().DefaultTest(true)); + Eval(new Gen>().DefaultTest(true)); + Eval(new Gen>().DefaultTest(true)); + + Eval(new Gen>>().DefaultTest(true)); + Eval(new Gen>>>().DefaultTest(true)); + Eval(new Gen>>>>().DefaultTest(true)); + + Eval(new Gen>>().DefaultTest(true)); + Eval(new Gen, RefX3>>>, RefX2, RefX3>>>>>().DefaultTest(true)); + Eval(new Gen, RefX2, RefX3>>().DefaultTest(true)); + + Eval(new Gen>().DefaultTest(false)); + Eval(new Gen>>().DefaultTest(false)); + Eval(new Gen>().DefaultTest(false)); + Eval(new Gen>().DefaultTest(false)); + + Eval(new Gen>>().DefaultTest(false)); + Eval(new Gen>>>().DefaultTest(false)); + Eval(new Gen>>>>().DefaultTest(false)); + + Eval(new Gen>>().DefaultTest(false)); + Eval(new Gen, ValX3>>>, ValX2, ValX3>>>>>().DefaultTest(false)); + Eval(new Gen, ValX2, ValX3>>().DefaultTest(false)); + + + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/TypeParameters/packages.config b/tests/src/JIT/Generics/TypeParameters/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/TypeParameters/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/Typeof/Struct02.cs b/tests/src/JIT/Generics/Typeof/Struct02.cs new file mode 100644 index 0000000..7ecc28a --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/Struct02.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public T Fld1; + public U Fld2; + + public Gen(T fld1, U fld2) + { + Fld1 = fld1; + Fld2 = fld2; + } + + public bool InstVerify(System.Type t1, System.Type t2) + { + bool result = true; + + if (!(typeof(T).Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + if (!(typeof(U).Equals(t2))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int(), new int())).InstVerify(typeof(int), typeof(int))); + Eval((new Gen(new int(), new double())).InstVerify(typeof(int), typeof(double))); + Eval((new Gen(new int(), "string")).InstVerify(typeof(int), typeof(string))); + Eval((new Gen(new int(), new object())).InstVerify(typeof(int), typeof(object))); + Eval((new Gen(new int(), new Guid())).InstVerify(typeof(int), typeof(Guid))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + + Eval((new Gen(new double(), new int())).InstVerify(typeof(double), typeof(int))); + Eval((new Gen(new double(), new double())).InstVerify(typeof(double), typeof(double))); + Eval((new Gen(new double(), "string")).InstVerify(typeof(double), typeof(string))); + Eval((new Gen(new double(), new object())).InstVerify(typeof(double), typeof(object))); + Eval((new Gen(new double(), new Guid())).InstVerify(typeof(double), typeof(Guid))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + + Eval((new Gen("string", new int())).InstVerify(typeof(string), typeof(int))); + Eval((new Gen("string", new double())).InstVerify(typeof(string), typeof(double))); + Eval((new Gen("string", "string")).InstVerify(typeof(string), typeof(string))); + Eval((new Gen("string", new object())).InstVerify(typeof(string), typeof(object))); + Eval((new Gen("string", new Guid())).InstVerify(typeof(string), typeof(Guid))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + + Eval((new Gen(new object(), new int())).InstVerify(typeof(object), typeof(int))); + Eval((new Gen(new object(), new double())).InstVerify(typeof(object), typeof(double))); + Eval((new Gen(new object(), "string")).InstVerify(typeof(object), typeof(string))); + Eval((new Gen(new object(), new object())).InstVerify(typeof(object), typeof(object))); + Eval((new Gen(new object(), new Guid())).InstVerify(typeof(object), typeof(Guid))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + + Eval((new Gen(new Guid(), new int())).InstVerify(typeof(Guid), typeof(int))); + Eval((new Gen(new Guid(), new double())).InstVerify(typeof(Guid), typeof(double))); + Eval((new Gen(new Guid(), "string")).InstVerify(typeof(Guid), typeof(string))); + Eval((new Gen(new Guid(), new object())).InstVerify(typeof(Guid), typeof(object))); + Eval((new Gen(new Guid(), new Guid())).InstVerify(typeof(Guid), typeof(Guid))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + + Eval((new Gen, int>(new RefX1(), new int())).InstVerify(typeof(RefX1), typeof(int))); + Eval((new Gen, double>(new RefX1(), new double())).InstVerify(typeof(RefX1), typeof(double))); + Eval((new Gen, string>(new RefX1(), "string")).InstVerify(typeof(RefX1), typeof(string))); + Eval((new Gen, object>(new RefX1(), new object())).InstVerify(typeof(RefX1), typeof(object))); + Eval((new Gen, Guid>(new RefX1(), new Guid())).InstVerify(typeof(RefX1), typeof(Guid))); + Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); + Eval((new Gen, RefX1>(new RefX1(), new RefX1())).InstVerify(typeof(RefX1), typeof(RefX1))); + Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); + Eval((new Gen, ValX1>>(new RefX1(), new ValX1>())).InstVerify(typeof(RefX1), typeof(ValX1>))); + Eval((new Gen, ValX1>(new RefX1(), new ValX1())).InstVerify(typeof(RefX1), typeof(ValX1))); + Eval((new Gen, ValX1[][, , ,][]>>(new RefX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(RefX1), typeof(ValX1[][, , ,][]>))); + + Eval((new Gen, int>(new ValX1(), new int())).InstVerify(typeof(ValX1), typeof(int))); + Eval((new Gen, double>(new ValX1(), new double())).InstVerify(typeof(ValX1), typeof(double))); + Eval((new Gen, string>(new ValX1(), "string")).InstVerify(typeof(ValX1), typeof(string))); + Eval((new Gen, object>(new ValX1(), new object())).InstVerify(typeof(ValX1), typeof(object))); + Eval((new Gen, Guid>(new ValX1(), new Guid())).InstVerify(typeof(ValX1), typeof(Guid))); + Eval((new Gen, RefX1>>(new ValX1(), new RefX1>())).InstVerify(typeof(ValX1), typeof(RefX1>))); + Eval((new Gen, RefX1>(new ValX1(), new RefX1())).InstVerify(typeof(ValX1), typeof(RefX1))); + Eval((new Gen, RefX1[][, , ,][]>>(new ValX1(), new RefX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(RefX1[][, , ,][]>))); + Eval((new Gen, ValX1>>(new ValX1(), new ValX1>())).InstVerify(typeof(ValX1), typeof(ValX1>))); + Eval((new Gen, ValX1>(new ValX1(), new ValX1())).InstVerify(typeof(ValX1), typeof(ValX1))); + Eval((new Gen, ValX1[][, , ,][]>>(new ValX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(ValX1[][, , ,][]>))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Typeof/TypeOf.csproj b/tests/src/JIT/Generics/Typeof/TypeOf.csproj new file mode 100644 index 0000000..33b2928 --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/TypeOf.csproj @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + false + + + + diff --git a/tests/src/JIT/Generics/Typeof/app.config b/tests/src/JIT/Generics/Typeof/app.config new file mode 100644 index 0000000..62803f5 --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/app.config @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tests/src/JIT/Generics/Typeof/class01.cs b/tests/src/JIT/Generics/Typeof/class01.cs new file mode 100644 index 0000000..4d7a2b5 --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/class01.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public T Fld1; + + public Gen(T fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(typeof(T).Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int())).InstVerify(typeof(int))); + Eval((new Gen(new double())).InstVerify(typeof(double))); + Eval((new Gen("string")).InstVerify(typeof(string))); + Eval((new Gen(new object())).InstVerify(typeof(object))); + Eval((new Gen(new Guid())).InstVerify(typeof(Guid))); + + Eval((new Gen(new int[1])).InstVerify(typeof(int[]))); + Eval((new Gen(new double[1, 1])).InstVerify(typeof(double[,]))); + Eval((new Gen(new string[1][][])).InstVerify(typeof(string[][][]))); + Eval((new Gen(new object[1, 1, 1, 1])).InstVerify(typeof(object[, , ,]))); + Eval((new Gen(new Guid[1][, , ,][])).InstVerify(typeof(Guid[][, , ,][]))); + + Eval((new Gen[]>(new RefX1[] { })).InstVerify(typeof(RefX1[]))); + Eval((new Gen[,]>(new RefX1[1, 1])).InstVerify(typeof(RefX1[,]))); + Eval((new Gen[][][]>(new RefX1[1][][])).InstVerify(typeof(RefX1[][][]))); + Eval((new Gen[, , ,]>(new RefX1[1, 1, 1, 1])).InstVerify(typeof(RefX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX1[1][, , ,][])).InstVerify(typeof(RefX1[][, , ,][]))); + + Eval((new Gen[]>(new RefX2[] { })).InstVerify(typeof(RefX2[]))); + Eval((new Gen[,]>(new RefX2[1, 1])).InstVerify(typeof(RefX2[,]))); + Eval((new Gen[][][]>(new RefX2[1][][])).InstVerify(typeof(RefX2[][][]))); + Eval((new Gen[, , ,]>(new RefX2[1, 1, 1, 1])).InstVerify(typeof(RefX2[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX2[1][, , ,][])).InstVerify(typeof(RefX2[][, , ,][]))); + + Eval((new Gen[]>(new ValX1[] { })).InstVerify(typeof(ValX1[]))); + Eval((new Gen[,]>(new ValX1[1, 1])).InstVerify(typeof(ValX1[,]))); + Eval((new Gen[][][]>(new ValX1[1][][])).InstVerify(typeof(ValX1[][][]))); + Eval((new Gen[, , ,]>(new ValX1[1, 1, 1, 1])).InstVerify(typeof(ValX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new ValX1[1][, , ,][])).InstVerify(typeof(ValX1[][, , ,][]))); + + Eval((new Gen[]>(new ValX2[] { })).InstVerify(typeof(ValX2[]))); + Eval((new Gen[,]>(new ValX2[1, 1])).InstVerify(typeof(ValX2[,]))); + Eval((new Gen[][][]>(new ValX2[1][][])).InstVerify(typeof(ValX2[][][]))); + Eval((new Gen[, , ,]>(new ValX2[1, 1, 1, 1])).InstVerify(typeof(ValX2[, , ,]))); + + Eval((new Gen[][, , ,][]>(new ValX2[1][, , ,][])).InstVerify(typeof(ValX2[][, , ,][]))); + + Eval((new Gen>(new RefX1())).InstVerify(typeof(RefX1))); + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>(new RefX2())).InstVerify(typeof(RefX2))); + Eval((new Gen>(new RefX3())).InstVerify(typeof(RefX3))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>>>(new RefX1>>())).InstVerify(typeof(RefX1>>))); + Eval((new Gen>>>>(new RefX1>>>())).InstVerify(typeof(RefX1>>>))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen, RefX3>>>, RefX2, RefX3>>>>>(new RefX2, RefX3>>>, RefX2, RefX3>>>>())).InstVerify(typeof(RefX2, RefX3>>>, RefX2, RefX3>>>>))); + Eval((new Gen, RefX2, RefX3>>(new RefX3, RefX2, RefX3>())).InstVerify(typeof(RefX3, RefX2, RefX3>))); + + Eval((new Gen>(new ValX1())).InstVerify(typeof(ValX1))); + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>(new ValX2())).InstVerify(typeof(ValX2))); + Eval((new Gen>(new ValX3())).InstVerify(typeof(ValX3))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>>>(new ValX1>>())).InstVerify(typeof(ValX1>>))); + Eval((new Gen>>>>(new ValX1>>>())).InstVerify(typeof(ValX1>>>))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen, ValX3>>>, ValX2, ValX3>>>>>(new ValX2, ValX3>>>, ValX2, ValX3>>>>())).InstVerify(typeof(ValX2, ValX3>>>, ValX2, ValX3>>>>))); + Eval((new Gen, ValX2, ValX3>>(new ValX3, ValX2, ValX3>())).InstVerify(typeof(ValX3, ValX2, ValX3>))); + + + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Typeof/class02.cs b/tests/src/JIT/Generics/Typeof/class02.cs new file mode 100644 index 0000000..850e92f --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/class02.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public class Gen +{ + public T Fld1; + public U Fld2; + + public Gen(T fld1, U fld2) + { + Fld1 = fld1; + Fld2 = fld2; + } + + public bool InstVerify(System.Type t1, System.Type t2) + { + bool result = true; + + if (!(typeof(T).Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + if (!(typeof(U).Equals(t2))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int(), new int())).InstVerify(typeof(int), typeof(int))); + Eval((new Gen(new int(), new double())).InstVerify(typeof(int), typeof(double))); + Eval((new Gen(new int(), "string")).InstVerify(typeof(int), typeof(string))); + Eval((new Gen(new int(), new object())).InstVerify(typeof(int), typeof(object))); + Eval((new Gen(new int(), new Guid())).InstVerify(typeof(int), typeof(Guid))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new RefX1())).InstVerify(typeof(int), typeof(RefX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + Eval((new Gen>(new int(), new ValX1())).InstVerify(typeof(int), typeof(ValX1))); + + Eval((new Gen(new double(), new int())).InstVerify(typeof(double), typeof(int))); + Eval((new Gen(new double(), new double())).InstVerify(typeof(double), typeof(double))); + Eval((new Gen(new double(), "string")).InstVerify(typeof(double), typeof(string))); + Eval((new Gen(new double(), new object())).InstVerify(typeof(double), typeof(object))); + Eval((new Gen(new double(), new Guid())).InstVerify(typeof(double), typeof(Guid))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new RefX1())).InstVerify(typeof(double), typeof(RefX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + Eval((new Gen>(new double(), new ValX1())).InstVerify(typeof(double), typeof(ValX1))); + + Eval((new Gen("string", new int())).InstVerify(typeof(string), typeof(int))); + Eval((new Gen("string", new double())).InstVerify(typeof(string), typeof(double))); + Eval((new Gen("string", "string")).InstVerify(typeof(string), typeof(string))); + Eval((new Gen("string", new object())).InstVerify(typeof(string), typeof(object))); + Eval((new Gen("string", new Guid())).InstVerify(typeof(string), typeof(Guid))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new RefX1())).InstVerify(typeof(string), typeof(RefX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + Eval((new Gen>("string", new ValX1())).InstVerify(typeof(string), typeof(ValX1))); + + Eval((new Gen(new object(), new int())).InstVerify(typeof(object), typeof(int))); + Eval((new Gen(new object(), new double())).InstVerify(typeof(object), typeof(double))); + Eval((new Gen(new object(), "string")).InstVerify(typeof(object), typeof(string))); + Eval((new Gen(new object(), new object())).InstVerify(typeof(object), typeof(object))); + Eval((new Gen(new object(), new Guid())).InstVerify(typeof(object), typeof(Guid))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new RefX1())).InstVerify(typeof(object), typeof(RefX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + Eval((new Gen>(new object(), new ValX1())).InstVerify(typeof(object), typeof(ValX1))); + + Eval((new Gen(new Guid(), new int())).InstVerify(typeof(Guid), typeof(int))); + Eval((new Gen(new Guid(), new double())).InstVerify(typeof(Guid), typeof(double))); + Eval((new Gen(new Guid(), "string")).InstVerify(typeof(Guid), typeof(string))); + Eval((new Gen(new Guid(), new object())).InstVerify(typeof(Guid), typeof(object))); + Eval((new Gen(new Guid(), new Guid())).InstVerify(typeof(Guid), typeof(Guid))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new RefX1())).InstVerify(typeof(Guid), typeof(RefX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + Eval((new Gen>(new Guid(), new ValX1())).InstVerify(typeof(Guid), typeof(ValX1))); + + Eval((new Gen, int>(new RefX1(), new int())).InstVerify(typeof(RefX1), typeof(int))); + Eval((new Gen, double>(new RefX1(), new double())).InstVerify(typeof(RefX1), typeof(double))); + Eval((new Gen, string>(new RefX1(), "string")).InstVerify(typeof(RefX1), typeof(string))); + Eval((new Gen, object>(new RefX1(), new object())).InstVerify(typeof(RefX1), typeof(object))); + Eval((new Gen, Guid>(new RefX1(), new Guid())).InstVerify(typeof(RefX1), typeof(Guid))); + Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); + Eval((new Gen, RefX1>(new RefX1(), new RefX1())).InstVerify(typeof(RefX1), typeof(RefX1))); + Eval((new Gen, RefX1>>(new RefX1(), new RefX1>())).InstVerify(typeof(RefX1), typeof(RefX1>))); + Eval((new Gen, ValX1>>(new RefX1(), new ValX1>())).InstVerify(typeof(RefX1), typeof(ValX1>))); + Eval((new Gen, ValX1>(new RefX1(), new ValX1())).InstVerify(typeof(RefX1), typeof(ValX1))); + Eval((new Gen, ValX1[][, , ,][]>>(new RefX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(RefX1), typeof(ValX1[][, , ,][]>))); + + Eval((new Gen, int>(new ValX1(), new int())).InstVerify(typeof(ValX1), typeof(int))); + Eval((new Gen, double>(new ValX1(), new double())).InstVerify(typeof(ValX1), typeof(double))); + Eval((new Gen, string>(new ValX1(), "string")).InstVerify(typeof(ValX1), typeof(string))); + Eval((new Gen, object>(new ValX1(), new object())).InstVerify(typeof(ValX1), typeof(object))); + Eval((new Gen, Guid>(new ValX1(), new Guid())).InstVerify(typeof(ValX1), typeof(Guid))); + Eval((new Gen, RefX1>>(new ValX1(), new RefX1>())).InstVerify(typeof(ValX1), typeof(RefX1>))); + Eval((new Gen, RefX1>(new ValX1(), new RefX1())).InstVerify(typeof(ValX1), typeof(RefX1))); + Eval((new Gen, RefX1[][, , ,][]>>(new ValX1(), new RefX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(RefX1[][, , ,][]>))); + Eval((new Gen, ValX1>>(new ValX1(), new ValX1>())).InstVerify(typeof(ValX1), typeof(ValX1>))); + Eval((new Gen, ValX1>(new ValX1(), new ValX1())).InstVerify(typeof(ValX1), typeof(ValX1))); + Eval((new Gen, ValX1[][, , ,][]>>(new ValX1(), new ValX1[][, , ,][]>())).InstVerify(typeof(ValX1), typeof(ValX1[][, , ,][]>))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Typeof/class03.cs b/tests/src/JIT/Generics/Typeof/class03.cs new file mode 100644 index 0000000..df1301b --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/class03.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + +public class Gen +{ + public T Fld1; + public U Fld2; + public V Fld3; + + public Gen(T fld1, U fld2, V fld3) + { + Fld1 = fld1; + Fld2 = fld2; + Fld3 = fld3; + } + + public bool InstVerify(System.Type t1, System.Type t2, System.Type t3) + { + bool result = true; + + if (!(typeof(T).Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + if (!(typeof(U).Equals(t2))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); + } + + if (!(typeof(V).Equals(t3))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld3 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int(), new double(), new Guid())).InstVerify(typeof(int), typeof(double), typeof(Guid))); + Eval((new Gen(new double(), new Guid(), "string")).InstVerify(typeof(double), typeof(Guid), typeof(string))); + Eval((new Gen(new Guid(), "string", new object())).InstVerify(typeof(Guid), typeof(string), typeof(object))); + Eval((new Gen("string", new object(), new int[1])).InstVerify(typeof(string), typeof(object), typeof(int[]))); + Eval((new Gen>>(new object(), new int[1], new RefX1>())).InstVerify(typeof(object), typeof(int[]), typeof(RefX1>))); + Eval((new Gen>, ValX1>>(new int[1], new RefX1>(), new ValX1>())).InstVerify(typeof(int[]), typeof(RefX1>), typeof(ValX1>))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Typeof/cs_template.proj b/tests/src/JIT/Generics/Typeof/cs_template.proj new file mode 100644 index 0000000..adc2f21 --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/cs_template.proj @@ -0,0 +1,42 @@ + + + + + Debug + AnyCPU + $(AssemblyName1) + 2.0 + {95DFC527-4DC1-495E-97D7-E94EE1F7140D} + Exe + Properties + 512 + {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + $(ProgramFiles)\Common Files\microsoft shared\VSTT\11.0\UITestExtensionPackages + ..\..\ + true + 7a9bfb7d + + + + + + + + + False + + + + + + + + + + + + + + + + diff --git a/tests/src/JIT/Generics/Typeof/dynamicTypes.cs b/tests/src/JIT/Generics/Typeof/dynamicTypes.cs new file mode 100644 index 0000000..cdc81d7 --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/dynamicTypes.cs @@ -0,0 +1,778 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +/* The following are the checks being made, where x is a user defined type as described below. The test does all of this pretty much as a grid cross section, so there are redundant cast cases also covered here. + +1. if(y.GetType() == typeof(x)) do something; +2. if(y is x) do something; +3. x z = y as x; + if(z != null) do something; +4. if(y.GetType() == typeof(x)) static cast y as x; +5. if(y is x) static cast y as x; +6. x z = y as x; + if(z != null) static cast y as x; + +where x can take the following values (whenever applicable): + + x is X< X > + x is X< X > + x is X< X > + x is X + x is X + x is X + x is A + x is B + x is C + x is D + x is CS + x is DS + +where the above classes have the following relationships: + +class X +class A : X +class B : X +class C : A +class D : B +sealed class CS : A +sealed class DS : B + */ + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; + +class X +{ + public static int x_count = 1; + public virtual void incCount() + { +/* switch(typeof(T)) + { + case int: + x_count*= 2; + break; + case string: + x_count*= 3; + break; + case double: + x_count*= 5; + break; + case void: + x_count*= 7; + break; + case X: + x_count*= 11; + break; + case X>: + x_count*= 13; + break; + } +*/ + if(typeof(T) == typeof(int)) + x_count*= 2; + else if(typeof(T) == typeof(string)) + x_count*= 3; + else if(typeof(T) == typeof(double)) + x_count*= 5; + else if(typeof(T) == typeof(void)) + x_count*= 7; + else if(typeof(T) == typeof(X) || typeof(T) == typeof(X)) + x_count*= 11; + else if(typeof(T) == typeof(X) || typeof(T) == null) + x_count*= 13; + else + Console.WriteLine("ERROR: Unknown type {0}", typeof(T)); + } +} + +class A : X +{ + public static int a_count = 1; + public override void incCount() { a_count*= 17;} +} + +class B : X +{ + public static int b_count = 1; + public override void incCount() { b_count*= 19;} +} + +class C : A +{ + public static int c_count = 1; + public override void incCount() { c_count*= 23;} +} + +class D : B +{ + public static int d_count = 1; + public override void incCount() { d_count*= 31;} +} + +sealed class CS : A +{ + public static int cs_count = 1; + public override void incCount() { cs_count*= 37;} +} + +sealed class DS : B +{ + public static int ds_count = 1; + public override void incCount() { ds_count*= 41;} +} + +class mainMethod +{ + public static bool failed = false; + public static void checkGetType(X x) + { + if(x.GetType() == typeof(DS)) (new DS()).incCount(); + if(x.GetType() == typeof(CS)) (new CS()).incCount(); + if(x.GetType() == typeof(D)) (new D()).incCount(); + if(x.GetType() == typeof(C)) (new C()).incCount(); + if(x.GetType() == typeof(B)) (new B()).incCount(); + if(x.GetType() == typeof(A)) (new A()).incCount(); + if(x.GetType() == typeof(X)) (new X()).incCount(); + if(x.GetType() == typeof(X)) (new X()).incCount(); + if(x.GetType() == typeof(X)) (new X()).incCount(); + if(x.GetType() == typeof(X< X >)) (new X< X >()).incCount(); + if(x.GetType() == typeof(X< X >)) (new X< X >()).incCount(); + if(x.GetType() == typeof(X< X >)) (new X< X >()).incCount(); + if(x.GetType() == null) (new X()).incCount(); + } + + public static void checkIs(X x) + { + //start from X + //if(x is null ) (new X< X >()).incCount(); + if(x is X< X >) (new X< X >()).incCount(); + if(x is X< X >) (new X< X >()).incCount(); + if(x is X< X >) (new X< X >()).incCount(); + if(x is X) (new X()).incCount(); + if(x is X) (new X()).incCount(); + if(x is X) (new X()).incCount(); + if(x is A) (new A()).incCount(); + if(x is B) (new B()).incCount(); + if(x is C) (new C()).incCount(); + if(x is D) (new D()).incCount(); + if(x is CS) (new CS()).incCount(); + if(x is DS) (new DS()).incCount(); + } + public static void checkAs(X x) + { + X< X > x6 = x as X< X >; + if(x6 != null) (new X< X >()).incCount(); + X< X > x5 = x as X< X >; + if(x5 != null) (new X< X >()).incCount(); + X< X > x4 = x as X< X >; + if(x4 != null) (new X< X >()).incCount(); + X x3 = x as X; + if(x3 != null) (new X()).incCount(); + X x2 = x as X; + if(x2 != null) (new X()).incCount(); + X x1 = x as X; + if(x1 != null) (new X()).incCount(); + A a = x as A; + if(a != null) (new A()).incCount(); + B b = x as B; + if(b != null) (new B()).incCount(); + C c = x as C; + if(c != null) (new C()).incCount(); + D d = x as D; + if(d != null) (new D()).incCount(); + CS cs = x as CS; + if(cs != null) (new CS()).incCount(); + DS ds = x as DS; + if(ds != null) (new DS()).incCount(); + + /* + //start from X + B b = x as B; + if(b != null) (new B()).incCount(); + checkCount(ref B.b_count, 31, "AS Failed for D"); + Console.WriteLine(D.b_count); + */ + } + public static void checkGetTypeStringCast(X x) + { + if(x.GetType() == typeof(DS)) ((DS)x).incCount(); + if(x.GetType() == typeof(D)) ((D)x).incCount(); + if(x.GetType() == typeof(B)) ((B)x).incCount(); + //if(x.GetType() == typeof(X)) ((X)x).incCount(); + if(x.GetType() == typeof(X)) ((X)x).incCount(); + //if(x.GetType() == typeof(X)) ((X)x).incCount(); + //if(x.GetType() == typeof(X< X >)) ((X< X >)x).incCount(); + //if(x.GetType() == typeof(X< X >)) ((X< X >)x).incCount(); + //if(x.GetType() == typeof(X< X >)) ((X< X >)x).incCount(); + if(x.GetType() == null) ((X)x).incCount(); + //if(x.GetType() == typeof(DS)) ((DS)x).incCount(); + } + public static void checkGetTypeIntCast(X x) + { + if(x.GetType() == typeof(CS)) ((CS)x).incCount(); + if(x.GetType() == typeof(C)) ((C)x).incCount(); + if(x.GetType() == typeof(A)) ((A)x).incCount(); + if(x.GetType() == typeof(X)) ((X)x).incCount(); + //if(x.GetType() == typeof(X)) ((X)x).incCount(); + //if(x.GetType() == typeof(X)) ((X)x).incCount(); + //if(x.GetType() == typeof(X< X >)) ((X< X >)x).incCount(); + //if(x.GetType() == typeof(X< X >)) ((X< X >)x).incCount(); + //if(x.GetType() == typeof(X< X >)) ((X< X >)x).incCount(); + if(x.GetType() == null) ((X)x).incCount(); + + //if(x.GetType() == typeof(CS)) ((CS)x).incCount(); + } + public static void checkIsStringCast(X x) + { + //if(x is null ) ((X< X >)x).incCount(); + //if(x is X< X >) ((X< X >)x).incCount(); + //if(x is X< X >) ((X< X >)x).incCount(); + //if(x is X< X >) ((X< X >)x).incCount(); + //if(x is X) ((X)x).incCount(); + if(x is X) ((X)x).incCount(); + //if(x is X) ((X)x).incCount(); + //if(x is A) ((A)x).incCount(); + if(x is B) ((B)x).incCount(); + //if(x is C) ((C)x).incCount(); + if(x is D) ((D)x).incCount(); + //if(x is CS) ((CS)x).incCount(); + if(x is DS) ((DS)x).incCount(); + + //if(x is DS) ((DS)x).incCount(); + } + public static void checkIsIntCast(X x) + { + //if(x is null ) ((X< X >)x).incCount(); + //if(x is X< X >) ((X< X >)x).incCount(); + //if(x is X< X >) ((X< X >)x).incCount(); + //if(x is X< X >) ((X< X >)x).incCount(); + //if(x is X) ((X)x).incCount(); + //if(x is X) ((X)x).incCount(); + if(x is X) ((X)x).incCount(); + if(x is A) ((A)x).incCount(); + //if(x is B) ((B)x).incCount(); + if(x is C) ((C)x).incCount(); + //if(x is D) ((D)x).incCount(); + if(x is CS) ((CS)x).incCount(); + //if(x is DS) ((DS)x).incCount(); + + //if(x is CS) ((CS)x).incCount(); + } + public static void checkAsStringCast(X x) + { + //X< X > x6 = x as X< X >; + //if(x6 != null) ((X< X >)x).incCount(); + //X< X > x5 = x as X< X >; + //if(x5 != null) ((X< X >)x).incCount(); + //X< X > x4 = x as X< X >; + //if(x4 != null) ((X< X >)x).incCount(); + //X x3 = x as X; + //if(x3 != null) ((X)x).incCount(); + X x2 = x as X; + if(x2 != null) ((X)x).incCount(); + //X x1 = x as X; + //if(x1 != null) ((X)x).incCount(); + //A a = x as A; + //if(a != null) ((A)x).incCount(); + B b = x as B; + if(b != null) ((B)x).incCount(); + //C c = x as C; + //if(c != null) ((C)x).incCount(); + D d = x as D; + if(d != null) ((D)x).incCount(); + //CS cs = x as CS; + //if(cs != null) ((CS)x).incCount(); + DS ds = x as DS; + if(ds != null) ((DS)x).incCount(); + + /* //start from X + B b = x as B; + if(b != null) ((B)x).incCount(); + checkCount(ref B.b_count, 31, "AS Failed for D"); + */ + } + public static void checkAsIntCast(X x) + { + //X< X > x6 = x as X< X >; + //if(x6 != null) ((X< X >)x).incCount(); + //X< X > x5 = x as X< X >; + //if(x5 != null) ((X< X >)x).incCount(); + //X< X > x4 = x as X< X >; + //if(x4 != null) ((X< X >)x).incCount(); + //X x3 = x as X; + //if(x3 != null) ((X)x).incCount(); + //X x2 = x as X; + //if(x2 != null) ((X)x).incCount(); + X x1 = x as X; + if(x1 != null) ((X)x).incCount(); + A a = x as A; + if(a != null) ((A)x).incCount(); + //B b = x as B; + //if(b != null) ((B)x).incCount(); + C c = x as C; + if(c != null) ((C)x).incCount(); + //D d = x as D; + //if(d != null) ((D)x).incCount(); + CS cs = x as CS; + if(cs != null) ((CS)x).incCount(); + //DS ds = x as DS; + //if(ds != null) ((DS)x).incCount(); + + /* + //start from X + A a = x as A; + if(a != null) ((A)x).incCount(); + checkCount(ref A.b_count, 31, "AS Failed for D"); + */ + } + + public static void checkCount(ref int actual, int expected, string message) + { + if(actual != expected) + { + Console.WriteLine("FAILED: {0}", message); + failed = true; + } + actual = 1; + } + + public static void checkAllCounts(ref int x_actual, int ds, int cs, int d, int c, int b, int a, int x, string dsm, string csm, string dm, string cm, string bm, string am, string xm) + { + /* + printCount(ref DS.ds_count, ds, dsm); + printCount(ref CS.cs_count, cs, csm); + printCount(ref D.d_count, d, dm); + printCount(ref C.c_count, c, cm); + printCount(ref B.b_count, b, bm); + printCount(ref A.a_count, a, am); + printCount(ref x_actual, x, xm); + */ + checkCount(ref DS.ds_count, ds, dsm); + checkCount(ref CS.cs_count, cs, csm); + checkCount(ref D.d_count, d, dm); + checkCount(ref C.c_count, c, cm); + checkCount(ref B.b_count, b, bm); + checkCount(ref A.a_count, a, am); + checkCount(ref x_actual, x, xm); + } + + public static void printCount(ref int actual, int expected, string message) + { + //Console.WriteLine("Result: {0} {1}", message, actual); + Console.Write("{0}, ", actual); + actual = 1; + } + + public static void callCheckGetType() + { + int i = 0; + checkGetType(new X< X >()); + checkAllCounts(ref X< X >.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new X< X >()); + checkAllCounts(ref X< X >.x_count, 1, 1, 1, 1, 1, 1, 13, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new X< X >()); + checkAllCounts(ref X< X >.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 5, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckIs() + { + int i = 0; + checkIs(new X< X >()); + checkAllCounts(ref X< X >.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new X< X >()); + checkAllCounts(ref X< X >.x_count, 1, 1, 1, 1, 1, 1, 13, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new X< X >()); + checkAllCounts(ref X< X >.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 5, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 3, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 17, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 19, 1, 3, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 17, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 19, 1, 3, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckAs() + { + int i = 0; + checkAs(new X< X >()); + checkAllCounts(ref X< X >.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new X< X >()); + checkAllCounts(ref X< X >.x_count, 1, 1, 1, 1, 1, 1, 13, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new X< X >()); + checkAllCounts(ref X< X >.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 5, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 3, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 17, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 19, 1, 3, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 17, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 19, 1, 3, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckGetTypeStringCast() + { + int i = 0; + //checkGetTypeStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + //Console.WriteLine("-----------{0}", i++); + //checkGetTypeStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + //Console.WriteLine("-----------{0}", i++); + //checkGetTypeStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + //Console.WriteLine("-----------{0}", i++); + //checkGetTypeStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + //Console.WriteLine("-----------{0}", i++); + //checkGetTypeStringCast(new X()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + //Console.WriteLine("-----------{0}", i++); + checkGetTypeStringCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + //checkGetTypeStringCast(new X()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + //Console.WriteLine("-----------{0}", i++); + //checkGetTypeStringCast(new A()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + //Console.WriteLine("-----------{0}", i++); + checkGetTypeStringCast(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + //checkGetTypeStringCast(new C()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + //Console.WriteLine("-----------{0}", i++); + checkGetTypeStringCast(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 1, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + //checkGetTypeStringCast(new CS()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + //Console.WriteLine("-----------{0}", i++); + checkGetTypeStringCast(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 1, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckGetTypeIntCast() + { + int i = 0; + //checkGetTypeIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkGetTypeIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkGetTypeIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkGetTypeIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkGetTypeIntCast(new X()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkGetTypeIntCast(new X()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + //Console.WriteLine("-----------{0}", i++); + checkGetTypeIntCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeIntCast(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 1, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + Console.WriteLine("-----------{0}", i++); + //checkGetTypeIntCast(new B()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + //Console.WriteLine("-----------{0}", i++); + checkGetTypeIntCast(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 1, 1, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + Console.WriteLine("-----------{0}", i++); + //checkGetTypeIntCast(new D()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + //Console.WriteLine("-----------{0}", i++); + checkGetTypeIntCast(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 1, 1, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + Console.WriteLine("-----------{0}", i++); + //checkGetTypeIntCast(new DS()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + //Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckIsStringCast() + { + int i = 0; + //checkIsStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + //Console.WriteLine("-----------{0}", i++); + //checkIsStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + //Console.WriteLine("-----------{0}", i++); + //checkIsStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + //Console.WriteLine("-----------{0}", i++); + //checkIsStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + //Console.WriteLine("-----------{0}", i++); + //checkIsStringCast(new X()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + //Console.WriteLine("-----------{0}", i++); + checkIsStringCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + //checkIsStringCast(new X()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + //Console.WriteLine("-----------{0}", i++); + //checkIsStringCast(new A()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + //Console.WriteLine("-----------{0}", i++); + checkIsStringCast(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 361, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + //checkIsStringCast(new C()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + //Console.WriteLine("-----------{0}", i++); + checkIsStringCast(new D()); + checkAllCounts(ref X.x_count, 1, 1, 29791, 1, 1, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + //checkIsStringCast(new CS()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + //Console.WriteLine("-----------{0}", i++); + checkIsStringCast(new DS()); + checkAllCounts(ref X.x_count, 68921, 1, 1, 1, 1, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckIsIntCast() + { + int i = 0; + //checkIsIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkIsIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkIsIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkIsIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkIsIntCast(new X()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkIsIntCast(new X()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + //Console.WriteLine("-----------{0}", i++); + checkIsIntCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + Console.WriteLine("-----------{0}", i++); + checkIsIntCast(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 289, 1, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + Console.WriteLine("-----------{0}", i++); + //checkIsIntCast(new B()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + //Console.WriteLine("-----------{0}", i++); + checkIsIntCast(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 12167, 1, 1, 1, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + Console.WriteLine("-----------{0}", i++); + //checkIsIntCast(new D()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + //Console.WriteLine("-----------{0}", i++); + checkIsIntCast(new CS()); + checkAllCounts(ref X.x_count, 1, 50653, 1, 1, 1, 1, 1, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + Console.WriteLine("-----------{0}", i++); + //checkIsIntCast(new DS()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + //Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckAsStringCast() + { + int i = 0; + //checkAsStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + //Console.WriteLine("-----------{0}", i++); + //checkAsStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + //Console.WriteLine("-----------{0}", i++); + //checkAsStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + //Console.WriteLine("-----------{0}", i++); + //checkAsStringCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + //Console.WriteLine("-----------{0}", i++); + //checkAsStringCast(new X()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + //Console.WriteLine("-----------{0}", i++); + checkAsStringCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + //checkAsStringCast(new X()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + //Console.WriteLine("-----------{0}", i++); + //checkAsStringCast(new A()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + //Console.WriteLine("-----------{0}", i++); + checkAsStringCast(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 361, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + //checkAsStringCast(new C()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + //Console.WriteLine("-----------{0}", i++); + checkAsStringCast(new D()); + checkAllCounts(ref X.x_count, 1, 1, 29791, 1, 1, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + //checkAsStringCast(new CS()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + //Console.WriteLine("-----------{0}", i++); + checkAsStringCast(new DS()); + checkAllCounts(ref X.x_count, 68921, 1, 1, 1, 1, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckAsIntCast() + { + int i = 0; + //checkAsIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkAsIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkAsIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkAsIntCast(new X< X >()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkAsIntCast(new X()); + //checkAllCounts(0, 0, 0, 0, 0, 0, 0, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + //Console.WriteLine("-----------{0}", i++); + //checkAsIntCast(new X()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + //Console.WriteLine("-----------{0}", i++); + checkAsIntCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + Console.WriteLine("-----------{0}", i++); + checkAsIntCast(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 289, 1, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + Console.WriteLine("-----------{0}", i++); + //checkAsIntCast(new B()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + //Console.WriteLine("-----------{0}", i++); + checkAsIntCast(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 12167, 1, 1, 1, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + Console.WriteLine("-----------{0}", i++); + //checkAsIntCast(new D()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + //Console.WriteLine("-----------{0}", i++); + checkAsIntCast(new CS()); + checkAllCounts(ref X.x_count, 1, 50653, 1, 1, 1, 1, 1, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + Console.WriteLine("-----------{0}", i++); + //checkAsIntCast(new DS()); + //checkAllCounts(ref X.x_count, 0, 0, 0, 0, 0, 0, 0, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + //Console.WriteLine("-----------{0}", i++); + } + + public static int Main() + { + callCheckGetType(); + callCheckIs(); + callCheckAs(); + callCheckGetTypeStringCast(); + callCheckGetTypeIntCast(); + callCheckIsStringCast(); + callCheckIsIntCast(); + callCheckAsStringCast(); + callCheckAsIntCast(); + if(failed) return 101; else return 100; + /* + CallX x = new A(); + X< X > y = new X< X >(); + x.incCount(); + y.incCount(); + Console.WriteLine(X< X >.x_count); + //checkGetType(new D()); + //checkIs(new D()); + checkAs(new D()); + */ + } +} diff --git a/tests/src/JIT/Generics/Typeof/objectBoxing.cs b/tests/src/JIT/Generics/Typeof/objectBoxing.cs new file mode 100644 index 0000000..686104b --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/objectBoxing.cs @@ -0,0 +1,363 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +/* unboxing where a parameter is types as object and then is unboxed to its scalar type + */ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; + +class X +{ + public static int x_count = 1; + public virtual void incCount() + { + x_count *= 2; + } +} + +class A : X +{ + public static int a_count = 1; + public override void incCount() { a_count *= 17; } +} + +class B : X +{ + public static int b_count = 1; + public override void incCount() { b_count *= 19; } +} + +class C : A +{ + public static int c_count = 1; + public override void incCount() { c_count *= 23; } +} + +class D : B +{ + public static int d_count = 1; + public override void incCount() { d_count *= 31; } +} + +sealed class CS : A +{ + public static int cs_count = 1; + public override void incCount() { cs_count *= 37; } +} + +sealed class DS : B +{ + public static int ds_count = 1; + public override void incCount() { ds_count *= 41; } +} + +class mainMethod +{ + public static bool failed = false; + public static void checkGetType(System.Object x) + { + if (x.GetType() == typeof(DS)) (new DS()).incCount(); + if (x.GetType() == typeof(CS)) (new CS()).incCount(); + if (x.GetType() == typeof(D)) (new D()).incCount(); + if (x.GetType() == typeof(C)) (new C()).incCount(); + if (x.GetType() == typeof(B)) (new B()).incCount(); + if (x.GetType() == typeof(A)) (new A()).incCount(); + if (x.GetType() == typeof(X)) (new X()).incCount(); + if (x.GetType() == null) (new X()).incCount(); + } + + public static void checkIs(System.Object x) + { + if (x is X) (new X()).incCount(); + if (x is A) (new A()).incCount(); + if (x is B) (new B()).incCount(); + if (x is C) (new C()).incCount(); + if (x is D) (new D()).incCount(); + if (x is CS) (new CS()).incCount(); + if (x is DS) (new DS()).incCount(); + } + + public static void checkAs(System.Object x) + { + X x1 = x as X; + if (x1 != null) (new X()).incCount(); + A a = x as A; + if (a != null) (new A()).incCount(); + B b = x as B; + if (b != null) (new B()).incCount(); + C c = x as C; + if (c != null) (new C()).incCount(); + D d = x as D; + if (d != null) (new D()).incCount(); + CS cs = x as CS; + if (cs != null) (new CS()).incCount(); + DS ds = x as DS; + if (ds != null) (new DS()).incCount(); + } + + public static void checkGetTypeObjectCast(System.Object x) + { + if (x.GetType() == typeof(DS)) ((DS)x).incCount(); + if (x.GetType() == typeof(CS)) ((CS)x).incCount(); + if (x.GetType() == typeof(D)) ((D)x).incCount(); + if (x.GetType() == typeof(C)) ((C)x).incCount(); + if (x.GetType() == typeof(B)) ((B)x).incCount(); + if (x.GetType() == typeof(A)) ((A)x).incCount(); + if (x.GetType() == typeof(X)) ((X)x).incCount(); + if (x.GetType() == null) ((X)x).incCount(); + } + + public static void checkIsObjectCast(System.Object x) + { + if (x is X) ((X)x).incCount(); + if (x is A) ((A)x).incCount(); + if (x is B) ((B)x).incCount(); + if (x is C) ((C)x).incCount(); + if (x is D) ((D)x).incCount(); + if (x is CS) ((CS)x).incCount(); + if (x is DS) ((DS)x).incCount(); + } + + public static void checkAsObjectCast(System.Object x) + { + X x2 = x as X; + if (x2 != null) ((X)x).incCount(); + A a = x as A; + if (a != null) ((A)x).incCount(); + B b = x as B; + if (b != null) ((B)x).incCount(); + C c = x as C; + if (c != null) ((C)x).incCount(); + D d = x as D; + if (d != null) ((D)x).incCount(); + CS cs = x as CS; + if (cs != null) ((CS)x).incCount(); + DS ds = x as DS; + if (ds != null) ((DS)x).incCount(); + } + + public static void checkCount(ref int actual, int expected, string message) + { + if (actual != expected) + { + Console.WriteLine("FAILED: {0}", message); + failed = true; + } + actual = 1; + } + + public static void checkAllCounts(ref int x_actual, int ds, int cs, int d, int c, int b, int a, int x, string dsm, string csm, string dm, string cm, string bm, string am, string xm) + { + + /* + printCount(ref DS.ds_count, ds, dsm); + printCount(ref CS.cs_count, cs, csm); + printCount(ref D.d_count, d, dm); + printCount(ref C.c_count, c, cm); + printCount(ref B.b_count, b, bm); + printCount(ref A.a_count, a, am); + printCount(ref x_actual, x, xm); + +*/ + checkCount(ref DS.ds_count, ds, dsm); + checkCount(ref CS.cs_count, cs, csm); + checkCount(ref D.d_count, d, dm); + checkCount(ref C.c_count, c, cm); + checkCount(ref B.b_count, b, bm); + checkCount(ref A.a_count, a, am); + checkCount(ref x_actual, x, xm); + } + + public static void printCount(ref int actual, int expected, string message) + { + Console.Write("{0}, ", actual); + actual = 1; + } + + public static void callCheckGetType() + { + int i = 0; + checkGetType(new System.Object()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckIs() + { + int i = 0; + checkIs(new System.Object()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 1, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 17, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 19, 1, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 17, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 19, 1, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckAs() + { + int i = 0; + checkAs(new System.Object()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 1, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 17, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 19, 1, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 17, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 19, 1, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckGetTypeObjectCast() + { + int i = 0; + checkGetTypeObjectCast(new System.Object()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeObjectCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeObjectCast(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeObjectCast(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeObjectCast(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeObjectCast(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 1, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeObjectCast(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeObjectCast(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 1, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckIsObjectCast() + { + int i = 0; + checkIsObjectCast(new System.Object()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsObjectCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsObjectCast(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 289, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsObjectCast(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 361, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsObjectCast(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 12167, 1, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsObjectCast(new D()); + checkAllCounts(ref X.x_count, 1, 1, 29791, 1, 1, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsObjectCast(new CS()); + checkAllCounts(ref X.x_count, 1, 50653, 1, 1, 1, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsObjectCast(new DS()); + checkAllCounts(ref X.x_count, 68921, 1, 1, 1, 1, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckAsObjectCast() + { + int i = 0; + checkAsObjectCast(new System.Object()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + checkAsObjectCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + checkAsObjectCast(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 289, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + checkAsObjectCast(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 361, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + checkAsObjectCast(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 12167, 1, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + checkAsObjectCast(new D()); + checkAllCounts(ref X.x_count, 1, 1, 29791, 1, 1, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + checkAsObjectCast(new CS()); + checkAllCounts(ref X.x_count, 1, 50653, 1, 1, 1, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + checkAsObjectCast(new DS()); + checkAllCounts(ref X.x_count, 68921, 1, 1, 1, 1, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + } + + public static int Main() + { + callCheckGetType(); + callCheckIs(); + callCheckAs(); + callCheckGetTypeObjectCast(); + callCheckIsObjectCast(); + callCheckAsObjectCast(); + if (failed) return 101; else return 100; + } +} diff --git a/tests/src/JIT/Generics/Typeof/packages.config b/tests/src/JIT/Generics/Typeof/packages.config new file mode 100644 index 0000000..06d3d11 --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/packages.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/tests/src/JIT/Generics/Typeof/refTypesdynamic.cs b/tests/src/JIT/Generics/Typeof/refTypesdynamic.cs new file mode 100644 index 0000000..59d6216 --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/refTypesdynamic.cs @@ -0,0 +1,485 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +/* Cases for some shared generics (generics instantiated over reference types, both sealed and unsealed). + */ + +using System; +using System.Reflection; +using System.Runtime.CompilerServices; + +class X +{ + public static int x_count = 1; + public virtual void incCount() + { + if (typeof(T) == typeof(class_int)) + x_count *= 2; + else if (typeof(T) == typeof(class_string)) + x_count *= 3; + else if (typeof(T) == typeof(class_double)) + x_count *= 5; + else if (typeof(T) == typeof(class_void)) + x_count *= 7; + else if (typeof(T) == typeof(X) || typeof(T) == typeof(X)) + x_count *= 11; + else if (typeof(T) == typeof(X) || typeof(T) == null) + x_count *= 13; + else + Console.WriteLine("ERROR: Unknown type {0}", typeof(T)); + } +} + +class class_int +{ + public static void printName() { Console.WriteLine("class_int"); } +} + +class class_string +{ + public static void printName() { Console.WriteLine("class_string"); } +} + +class class_double +{ + public static void printName() { Console.WriteLine("class_double"); } +} + +class class_void +{ + public static void printName() { Console.WriteLine("class_void"); } +} + +class A : X +{ + public static int a_count = 1; + public override void incCount() { a_count *= 17; } +} + +class B : X +{ + public static int b_count = 1; + public override void incCount() { b_count *= 19; } +} + +class C : A +{ + public static int c_count = 1; + public override void incCount() { c_count *= 23; } +} + +class D : B +{ + public static int d_count = 1; + public override void incCount() { d_count *= 31; } +} + +sealed class CS : A +{ + public static int cs_count = 1; + public override void incCount() { cs_count *= 37; } +} + +sealed class DS : B +{ + public static int ds_count = 1; + public override void incCount() { ds_count *= 41; } +} + +class mainMethod +{ + public static bool failed = false; + public static void checkGetType(X x) + { + if (x.GetType() == typeof(DS)) (new DS()).incCount(); + if (x.GetType() == typeof(CS)) (new CS()).incCount(); + if (x.GetType() == typeof(D)) (new D()).incCount(); + if (x.GetType() == typeof(C)) (new C()).incCount(); + if (x.GetType() == typeof(B)) (new B()).incCount(); + if (x.GetType() == typeof(A)) (new A()).incCount(); + if (x.GetType() == typeof(X)) (new X()).incCount(); + if (x.GetType() == typeof(X)) (new X()).incCount(); + if (x.GetType() == typeof(X)) (new X()).incCount(); + if (x.GetType() == typeof(X>)) (new X>()).incCount(); + if (x.GetType() == typeof(X>)) (new X>()).incCount(); + if (x.GetType() == typeof(X>)) (new X>()).incCount(); + if (x.GetType() == null) (new X()).incCount(); + } + + public static void checkIs(X x) + { + //start from X + if (x is X>) (new X>()).incCount(); + if (x is X>) (new X>()).incCount(); + if (x is X>) (new X>()).incCount(); + if (x is X) (new X()).incCount(); + if (x is X) (new X()).incCount(); + if (x is X) (new X()).incCount(); + if (x is A) (new A()).incCount(); + if (x is B) (new B()).incCount(); + if (x is C) (new C()).incCount(); + if (x is D) (new D()).incCount(); + if (x is CS) (new CS()).incCount(); + if (x is DS) (new DS()).incCount(); + } + public static void checkAs(X x) + { + X> x6 = x as X>; + if (x6 != null) (new X>()).incCount(); + X> x5 = x as X>; + if (x5 != null) (new X>()).incCount(); + X> x4 = x as X>; + if (x4 != null) (new X>()).incCount(); + X x3 = x as X; + if (x3 != null) (new X()).incCount(); + X x2 = x as X; + if (x2 != null) (new X()).incCount(); + X x1 = x as X; + if (x1 != null) (new X()).incCount(); + A a = x as A; + if (a != null) (new A()).incCount(); + B b = x as B; + if (b != null) (new B()).incCount(); + C c = x as C; + if (c != null) (new C()).incCount(); + D d = x as D; + if (d != null) (new D()).incCount(); + CS cs = x as CS; + if (cs != null) (new CS()).incCount(); + DS ds = x as DS; + if (ds != null) (new DS()).incCount(); + + } + public static void checkGetTypeStringCast(X x) + { + if (x.GetType() == typeof(DS)) ((DS)x).incCount(); + if (x.GetType() == typeof(D)) ((D)x).incCount(); + if (x.GetType() == typeof(B)) ((B)x).incCount(); + if (x.GetType() == typeof(X)) ((X)x).incCount(); + if (x.GetType() == null) ((X)x).incCount(); + } + public static void checkGetTypeIntCast(X x) + { + if (x.GetType() == typeof(CS)) ((CS)x).incCount(); + if (x.GetType() == typeof(C)) ((C)x).incCount(); + if (x.GetType() == typeof(A)) ((A)x).incCount(); + if (x.GetType() == typeof(X)) ((X)x).incCount(); + if (x.GetType() == null) ((X)x).incCount(); + + } + public static void checkIsStringCast(X x) + { + if (x is X) ((X)x).incCount(); + if (x is B) ((B)x).incCount(); + if (x is D) ((D)x).incCount(); + if (x is DS) ((DS)x).incCount(); + + } + public static void checkIsIntCast(X x) + { + if (x is X) ((X)x).incCount(); + if (x is A) ((A)x).incCount(); + if (x is C) ((C)x).incCount(); + if (x is CS) ((CS)x).incCount(); + + } + public static void checkAsStringCast(X x) + { + X x2 = x as X; + if (x2 != null) ((X)x).incCount(); + B b = x as B; + if (b != null) ((B)x).incCount(); + D d = x as D; + if (d != null) ((D)x).incCount(); + DS ds = x as DS; + if (ds != null) ((DS)x).incCount(); + + } + public static void checkAsIntCast(X x) + { + X x1 = x as X; + if (x1 != null) ((X)x).incCount(); + A a = x as A; + if (a != null) ((A)x).incCount(); + C c = x as C; + if (c != null) ((C)x).incCount(); + CS cs = x as CS; + if (cs != null) ((CS)x).incCount(); + } + + public static void checkCount(ref int actual, int expected, string message) + { + if (actual != expected) + { + Console.WriteLine("FAILED: {0}", message); + failed = true; + } + actual = 1; + } + + public static void checkAllCounts(ref int x_actual, int ds, int cs, int d, int c, int b, int a, int x, string dsm, string csm, string dm, string cm, string bm, string am, string xm) + { + /* + printCount(ref DS.ds_count, ds, dsm); + printCount(ref CS.cs_count, cs, csm); + printCount(ref D.d_count, d, dm); + printCount(ref C.c_count, c, cm); + printCount(ref B.b_count, b, bm); + printCount(ref A.a_count, a, am); + printCount(ref x_actual, x, xm); + */ + checkCount(ref DS.ds_count, ds, dsm); + checkCount(ref CS.cs_count, cs, csm); + checkCount(ref D.d_count, d, dm); + checkCount(ref C.c_count, c, cm); + checkCount(ref B.b_count, b, bm); + checkCount(ref A.a_count, a, am); + checkCount(ref x_actual, x, xm); + } + + public static void printCount(ref int actual, int expected, string message) + { + Console.Write("{0}, ", actual); + actual = 1; + } + + public static void callCheckGetType() + { + int i = 0; + checkGetType(new X>()); + checkAllCounts(ref X>.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new X>()); + checkAllCounts(ref X>.x_count, 1, 1, 1, 1, 1, 1, 13, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new X>()); + checkAllCounts(ref X>.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 5, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetType(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof", "B Count after GetType and typeof", "A Count after GetType and typeof", "X Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckIs() + { + int i = 0; + checkIs(new X>()); + checkAllCounts(ref X>.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new X>()); + checkAllCounts(ref X>.x_count, 1, 1, 1, 1, 1, 1, 13, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new X>()); + checkAllCounts(ref X>.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 5, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 3, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 17, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 19, 1, 3, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 17, 2, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIs(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 19, 1, 3, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is", "B Count after checking is", "A Count after checking is", "X Count after checking is"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckAs() + { + int i = 0; + checkAs(new X>()); + checkAllCounts(ref X>.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new X>()); + checkAllCounts(ref X>.x_count, 1, 1, 1, 1, 1, 1, 13, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new X>()); + checkAllCounts(ref X>.x_count, 1, 1, 1, 1, 1, 1, 11, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 5, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 3, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 17, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 19, 1, 3, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 17, 2, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + checkAs(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 19, 1, 3, "DS Count after checking as", "CS Count after checking as", "D Count after checking as", "C Count after checking as", "B Count after checking as", "A Count after checking as", "X Count after checking as"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckGetTypeStringCast() + { + int i = 0; + checkGetTypeStringCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeStringCast(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 19, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeStringCast(new D()); + checkAllCounts(ref X.x_count, 1, 1, 31, 1, 1, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeStringCast(new DS()); + checkAllCounts(ref X.x_count, 41, 1, 1, 1, 1, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast", "B Count after GetType and typeof string cast", "A Count after GetType and typeof string cast", "X Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckGetTypeIntCast() + { + int i = 0; + checkGetTypeIntCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeIntCast(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 17, 1, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeIntCast(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 23, 1, 1, 1, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeIntCast(new CS()); + checkAllCounts(ref X.x_count, 1, 37, 1, 1, 1, 1, 1, "DS Count after GetType and typeof int cast", "CS Count after GetType and typeof int cast", "D Count after GetType and typeof int cast", "C Count after GetType and typeof int cast", "B Count after GetType and typeof int cast", "A Count after GetType and typeof int cast", "X Count after GetType and typeof int cast"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckIsStringCast() + { + int i = 0; + checkIsStringCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsStringCast(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 361, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsStringCast(new D()); + checkAllCounts(ref X.x_count, 1, 1, 29791, 1, 1, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsStringCast(new DS()); + checkAllCounts(ref X.x_count, 68921, 1, 1, 1, 1, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast ", "B Count after check is string cast ", "A Count after check is string cast ", "X Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckIsIntCast() + { + int i = 0; + checkIsIntCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + Console.WriteLine("-----------{0}", i++); + checkIsIntCast(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 289, 1, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + Console.WriteLine("-----------{0}", i++); + checkIsIntCast(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 12167, 1, 1, 1, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + Console.WriteLine("-----------{0}", i++); + checkIsIntCast(new CS()); + checkAllCounts(ref X.x_count, 1, 50653, 1, 1, 1, 1, 1, "DS Count after check is int cast", "CS Count after check is int cast", "D Count after check is int cast", "C Count after check is int cast", "B Count after check is int cast", "A Count after check is int cast", "X Count after check is int cast"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckAsStringCast() + { + int i = 0; + checkAsStringCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 3, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + checkAsStringCast(new B()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 361, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + checkAsStringCast(new D()); + checkAllCounts(ref X.x_count, 1, 1, 29791, 1, 1, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + checkAsStringCast(new DS()); + checkAllCounts(ref X.x_count, 68921, 1, 1, 1, 1, 1, 1, "DS Count after check as string cast ", "CS Count after check as string cast ", "D Count after check as string cast ", "C Count after check as string cast ", "B Count after check as string cast ", "A Count after check as string cast ", "X Count after check as string cast "); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckAsIntCast() + { + int i = 0; + checkAsIntCast(new X()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 1, 2, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + Console.WriteLine("-----------{0}", i++); + checkAsIntCast(new A()); + checkAllCounts(ref X.x_count, 1, 1, 1, 1, 1, 289, 1, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + Console.WriteLine("-----------{0}", i++); + checkAsIntCast(new C()); + checkAllCounts(ref X.x_count, 1, 1, 1, 12167, 1, 1, 1, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + Console.WriteLine("-----------{0}", i++); + checkAsIntCast(new CS()); + checkAllCounts(ref X.x_count, 1, 50653, 1, 1, 1, 1, 1, "DS Count after check as int cast", "CS Count after check as int cast", "D Count after check as int cast", "C Count after check as int cast", "B Count after check as int cast", "A Count after check as int cast", "X Count after check as int cast"); + Console.WriteLine("-----------{0}", i++); + } + + public static int Main() + { + callCheckGetType(); + callCheckIs(); + callCheckAs(); + callCheckGetTypeStringCast(); + callCheckGetTypeIntCast(); + callCheckIsStringCast(); + callCheckIsIntCast(); + callCheckAsStringCast(); + callCheckAsIntCast(); + if (failed) return 101; else return 100; + } +} diff --git a/tests/src/JIT/Generics/Typeof/struct01.cs b/tests/src/JIT/Generics/Typeof/struct01.cs new file mode 100644 index 0000000..d366607 --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/struct01.cs @@ -0,0 +1,142 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + + +public struct Gen +{ + public T Fld1; + + public Gen(T fld1) + { + Fld1 = fld1; + } + + public bool InstVerify(System.Type t1) + { + bool result = true; + + if (!(typeof(T).Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int())).InstVerify(typeof(int))); + Eval((new Gen(new double())).InstVerify(typeof(double))); + Eval((new Gen("string")).InstVerify(typeof(string))); + Eval((new Gen(new object())).InstVerify(typeof(object))); + Eval((new Gen(new Guid())).InstVerify(typeof(Guid))); + + Eval((new Gen(new int[1])).InstVerify(typeof(int[]))); + Eval((new Gen(new double[1, 1])).InstVerify(typeof(double[,]))); + Eval((new Gen(new string[1][][])).InstVerify(typeof(string[][][]))); + Eval((new Gen(new object[1, 1, 1, 1])).InstVerify(typeof(object[, , ,]))); + Eval((new Gen(new Guid[1][, , ,][])).InstVerify(typeof(Guid[][, , ,][]))); + + Eval((new Gen[]>(new RefX1[] { })).InstVerify(typeof(RefX1[]))); + Eval((new Gen[,]>(new RefX1[1, 1])).InstVerify(typeof(RefX1[,]))); + Eval((new Gen[][][]>(new RefX1[1][][])).InstVerify(typeof(RefX1[][][]))); + Eval((new Gen[, , ,]>(new RefX1[1, 1, 1, 1])).InstVerify(typeof(RefX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX1[1][, , ,][])).InstVerify(typeof(RefX1[][, , ,][]))); + + Eval((new Gen[]>(new RefX2[] { })).InstVerify(typeof(RefX2[]))); + Eval((new Gen[,]>(new RefX2[1, 1])).InstVerify(typeof(RefX2[,]))); + Eval((new Gen[][][]>(new RefX2[1][][])).InstVerify(typeof(RefX2[][][]))); + Eval((new Gen[, , ,]>(new RefX2[1, 1, 1, 1])).InstVerify(typeof(RefX2[, , ,]))); + Eval((new Gen[][, , ,][]>(new RefX2[1][, , ,][])).InstVerify(typeof(RefX2[][, , ,][]))); + + Eval((new Gen[]>(new ValX1[] { })).InstVerify(typeof(ValX1[]))); + Eval((new Gen[,]>(new ValX1[1, 1])).InstVerify(typeof(ValX1[,]))); + Eval((new Gen[][][]>(new ValX1[1][][])).InstVerify(typeof(ValX1[][][]))); + Eval((new Gen[, , ,]>(new ValX1[1, 1, 1, 1])).InstVerify(typeof(ValX1[, , ,]))); + Eval((new Gen[][, , ,][]>(new ValX1[1][, , ,][])).InstVerify(typeof(ValX1[][, , ,][]))); + + Eval((new Gen[]>(new ValX2[] { })).InstVerify(typeof(ValX2[]))); + Eval((new Gen[,]>(new ValX2[1, 1])).InstVerify(typeof(ValX2[,]))); + Eval((new Gen[][][]>(new ValX2[1][][])).InstVerify(typeof(ValX2[][][]))); + Eval((new Gen[, , ,]>(new ValX2[1, 1, 1, 1])).InstVerify(typeof(ValX2[, , ,]))); + + Eval((new Gen[][, , ,][]>(new ValX2[1][, , ,][])).InstVerify(typeof(ValX2[][, , ,][]))); + + Eval((new Gen>(new RefX1())).InstVerify(typeof(RefX1))); + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>(new RefX2())).InstVerify(typeof(RefX2))); + Eval((new Gen>(new RefX3())).InstVerify(typeof(RefX3))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen>>>(new RefX1>>())).InstVerify(typeof(RefX1>>))); + Eval((new Gen>>>>(new RefX1>>>())).InstVerify(typeof(RefX1>>>))); + + Eval((new Gen>>(new RefX1>())).InstVerify(typeof(RefX1>))); + Eval((new Gen, RefX3>>>, RefX2, RefX3>>>>>(new RefX2, RefX3>>>, RefX2, RefX3>>>>())).InstVerify(typeof(RefX2, RefX3>>>, RefX2, RefX3>>>>))); + Eval((new Gen, RefX2, RefX3>>(new RefX3, RefX2, RefX3>())).InstVerify(typeof(RefX3, RefX2, RefX3>))); + + Eval((new Gen>(new ValX1())).InstVerify(typeof(ValX1))); + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>(new ValX2())).InstVerify(typeof(ValX2))); + Eval((new Gen>(new ValX3())).InstVerify(typeof(ValX3))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen>>>(new ValX1>>())).InstVerify(typeof(ValX1>>))); + Eval((new Gen>>>>(new ValX1>>>())).InstVerify(typeof(ValX1>>>))); + + Eval((new Gen>>(new ValX1>())).InstVerify(typeof(ValX1>))); + Eval((new Gen, ValX3>>>, ValX2, ValX3>>>>>(new ValX2, ValX3>>>, ValX2, ValX3>>>>())).InstVerify(typeof(ValX2, ValX3>>>, ValX2, ValX3>>>>))); + Eval((new Gen, ValX2, ValX3>>(new ValX3, ValX2, ValX3>())).InstVerify(typeof(ValX3, ValX2, ValX3>))); + + + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Typeof/struct03.cs b/tests/src/JIT/Generics/Typeof/struct03.cs new file mode 100644 index 0000000..123f107 --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/struct03.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +using System; + +public struct ValX0 { } +public struct ValY0 { } +public struct ValX1 { } +public struct ValY1 { } +public struct ValX2 { } +public struct ValY2 { } +public struct ValX3 { } +public struct ValY3 { } +public class RefX0 { } +public class RefY0 { } +public class RefX1 { } +public class RefY1 { } +public class RefX2 { } +public class RefY2 { } +public class RefX3 { } +public class RefY3 { } + +public struct Gen +{ + public T Fld1; + public U Fld2; + public V Fld3; + + public Gen(T fld1, U fld2, V fld3) + { + Fld1 = fld1; + Fld2 = fld2; + Fld3 = fld3; + } + + public bool InstVerify(System.Type t1, System.Type t2, System.Type t3) + { + bool result = true; + + if (!(typeof(T).Equals(t1))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld1 in: " + typeof(Gen)); + } + + if (!(typeof(U).Equals(t2))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld2 in: " + typeof(Gen)); + } + + if (!(typeof(V).Equals(t3))) + { + result = false; + Console.WriteLine("Failed to verify type of Fld3 in: " + typeof(Gen)); + } + + return result; + } +} + +public class Test +{ + public static int counter = 0; + public static bool result = true; + public static void Eval(bool exp) + { + counter++; + if (!exp) + { + result = exp; + Console.WriteLine("Test Failed at location: " + counter); + } + + } + + public static int Main() + { + Eval((new Gen(new int(), new double(), new Guid())).InstVerify(typeof(int), typeof(double), typeof(Guid))); + Eval((new Gen(new double(), new Guid(), "string")).InstVerify(typeof(double), typeof(Guid), typeof(string))); + Eval((new Gen(new Guid(), "string", new object())).InstVerify(typeof(Guid), typeof(string), typeof(object))); + Eval((new Gen("string", new object(), new int[1])).InstVerify(typeof(string), typeof(object), typeof(int[]))); + Eval((new Gen>>(new object(), new int[1], new RefX1>())).InstVerify(typeof(object), typeof(int[]), typeof(RefX1>))); + Eval((new Gen>, ValX1>>(new int[1], new RefX1>(), new ValX1>())).InstVerify(typeof(int[]), typeof(RefX1>), typeof(ValX1>))); + + if (result) + { + Console.WriteLine("Test Passed"); + return 100; + } + else + { + Console.WriteLine("Test Failed"); + return 1; + } + } + +} diff --git a/tests/src/JIT/Generics/Typeof/valueTypeBoxing.cs b/tests/src/JIT/Generics/Typeof/valueTypeBoxing.cs new file mode 100644 index 0000000..658bb60 --- /dev/null +++ b/tests/src/JIT/Generics/Typeof/valueTypeBoxing.cs @@ -0,0 +1,234 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. +// + +/* Unboxing where a parameter is types as System.ValueType, or System.Enum, and then is unboxed to its scalar type + */ +using System; +using System.Reflection; +using System.Runtime.CompilerServices; + +interface X +{ + void incCount(); +} + +interface A : X +{ +} + +interface B : X +{ +} + +struct C : A +{ + public static int c_count = 1; + public void incCount() { c_count *= 23; } +} + +struct D : B +{ + public static int d_count = 1; + public void incCount() { d_count *= 31; } +} + +struct CSS : A +{ + public static int cs_count = 1; + public void incCount() { cs_count *= 37; } + public void readInput(int input) { cs_count = cs_count += input; } +} + +struct DSS : B +{ + public static int ds_count = 1; + public void incCount() { ds_count *= 41; } + public void readInput(int input) { ds_count = ds_count += input; } +} + +enum CS +{ + Day = 0, Night = 1 +}; + +enum DS +{ + Day = 1, Night = 0 +}; + +struct mainMethod +{ + public static bool failed = false; + public static void checkGetTypeValueType(System.ValueType x) + { + if (x.GetType() == typeof(D)) (new D()).incCount(); + if (x.GetType() == typeof(C)) (new C()).incCount(); + } + + public static void checkIsValueType(System.ValueType x) + { + if (x is C) (new C()).incCount(); + if (x is D) (new D()).incCount(); + } + + public static void checkGetTypeValueTypeCast(System.ValueType x) + { + if (x.GetType() == typeof(D)) ((D)x).incCount(); + if (x.GetType() == typeof(C)) ((C)x).incCount(); + } + + public static void checkIsValueTypeCast(System.ValueType x) + { + if (x is C) ((C)x).incCount(); + if (x is D) ((D)x).incCount(); + } + + public static void checkGetTypeEnum(System.Enum x) + { + if (x.GetType() == typeof(DS)) (new DSS()).incCount(); + if (x.GetType() == typeof(CS)) (new CSS()).incCount(); + } + + public static void checkIsEnum(System.Enum x) + { + if (x is CS) (new CSS()).incCount(); + if (x is DS) (new DSS()).incCount(); + } + + public static void checkGetTypeEnumCast(System.Enum x) + { + if (x.GetType() == typeof(DS)) (new DSS()).readInput(Convert.ToInt32(DS.Day)); + if (x.GetType() == typeof(CS)) (new CSS()).readInput(Convert.ToInt32(CS.Night)); + } + + public static void checkIsEnumCast(System.Enum x) + { + if (x is CS) (new CSS()).readInput(Convert.ToInt32(CS.Night)); + if (x is DS) (new DSS()).readInput(Convert.ToInt32(DS.Day)); + } + + public static void checkCount(ref int actual, int expected, string message) + { + if (actual != expected) + { + Console.WriteLine("FAILED: {0}", message); + failed = true; + } + actual = 1; + } + + public static void checkAllCounts(ref int x_actual, int ds, int cs, int d, int c, string dsm, string csm, string dm, string cm) + { + + /* +int tmp = 1; + printCount(ref DSS.ds_count, ds, dsm); + printCount(ref CSS.cs_count, cs, csm); + printCount(ref D.d_count, d, dm); + printCount(ref C.c_count, c, cm); + printCount(ref tmp, b, bm); + printCount(ref tmp, a, am); + printCount(ref tmp, x, xm); + //printCount(ref B.b_count, b, bm); + //printCount(ref A.a_count, a, am); + //printCount(ref x_actual, x, xm); + +*/ + checkCount(ref DSS.ds_count, ds, dsm); + checkCount(ref CSS.cs_count, cs, csm); + checkCount(ref D.d_count, d, dm); + checkCount(ref C.c_count, c, cm); + //checkCount(ref B.b_count, b, bm); + //checkCount(ref A.a_count, a, am); + //checkCount(ref x_actual, x, xm); + } + + public static void printCount(ref int actual, int expected, string message) + { + Console.Write("{0}, ", actual); + actual = 1; + } + + public static void callCheckGetTypeValueType() + { + int i = 0; + int dummy = 1; + checkGetTypeValueType(new C()); + checkAllCounts(ref dummy, 1, 1, 1, 23, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeValueType(new D()); + checkAllCounts(ref dummy, 1, 1, 31, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeEnum(new CS()); + checkAllCounts(ref dummy, 1, 37, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeEnum(new DS()); + checkAllCounts(ref dummy, 41, 1, 1, 1, "DS Count after GetType and typeof", "CS Count after GetType and typeof", "D Count after GetType and typeof", "C Count after GetType and typeof"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckIsValueType() + { + int i = 0; + int dummy = 1; + checkIsValueType(new C()); + checkAllCounts(ref dummy, 1, 1, 1, 23, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIsValueType(new D()); + checkAllCounts(ref dummy, 1, 1, 31, 1, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIsEnum(new CS()); + checkAllCounts(ref dummy, 1, 37, 1, 1, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is"); + Console.WriteLine("-----------{0}", i++); + checkIsEnum(new DS()); + checkAllCounts(ref dummy, 41, 1, 1, 1, "DS Count after checking is", "CS Count after checking is", "D Count after checking is", "C Count after checking is"); + Console.WriteLine("-----------{0}", i++); + } + + + public static void callCheckGetTypeValueTypeCast() + { + int i = 0; + int dummy = 1; + checkGetTypeValueTypeCast(new C()); + checkAllCounts(ref dummy, 1, 1, 1, 23, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeValueTypeCast(new D()); + checkAllCounts(ref dummy, 1, 1, 31, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeEnumCast(new CS()); + checkAllCounts(ref dummy, 1, 2, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + checkGetTypeEnumCast(new DS()); + checkAllCounts(ref dummy, 2, 1, 1, 1, "DS Count after GetType and typeof string cast", "CS Count after GetType and typeof string cast", "D Count after GetType and typeof string cast", "C Count after GetType and typeof string cast"); + Console.WriteLine("-----------{0}", i++); + } + + public static void callCheckIsValueTypeCast() + { + int i = 0; + int dummy = 1; + checkIsValueTypeCast(new C()); + checkAllCounts(ref dummy, 1, 1, 1, 23, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsValueTypeCast(new D()); + checkAllCounts(ref dummy, 1, 1, 31, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsEnumCast(new CS()); + checkAllCounts(ref dummy, 1, 2, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + checkIsEnumCast(new DS()); + checkAllCounts(ref dummy, 2, 1, 1, 1, "DS Count after check is string cast ", "CS Count after check is string cast ", "D Count after check is string cast ", "C Count after check is string cast "); + Console.WriteLine("-----------{0}", i++); + } + + public static int Main() + { + callCheckGetTypeValueType(); + callCheckIsValueType(); + callCheckGetTypeValueTypeCast(); + callCheckIsValueTypeCast(); + if (failed) return 101; else return 100; + } +} -- 2.7.4