Skip to content

Commit 851fc98

Browse files
committed
C#: Add type unification tests for nested types
1 parent 3b3ca6d commit 851fc98

File tree

3 files changed

+379
-298
lines changed

3 files changed

+379
-298
lines changed

csharp/ql/test/library-tests/unification/Unification.cs

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
interface I1 { }
22

3-
struct S1 { } struct S2 { }
3+
struct S1 { }
4+
struct S2 { }
45

56
class C0 { }
67
class C1<T1> { }
@@ -31,3 +32,19 @@ class Tuples<T8, T9>
3132
static (T8, T9) t4;
3233
static (T8 a, T9 b) t5 = t4;
3334
}
35+
36+
class Nested<T10>
37+
{
38+
class NestedA<T11> { }
39+
class NestedB
40+
{
41+
public class NestedC<T12> { }
42+
}
43+
44+
Nested<int>.NestedA<string> x1;
45+
Nested<string>.NestedA<int> x2;
46+
Nested<int>.NestedB x3;
47+
Nested<string>.NestedB x4;
48+
Nested<int>.NestedB.NestedC<bool> x5;
49+
Nested<string>.NestedB.NestedC<decimal> x6;
50+
}

0 commit comments

Comments
 (0)