Skip to content

Commit 828b33a

Browse files
Add test demonstrating the problem with conflict markers.
1 parent 5ecc288 commit 828b33a

2 files changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
tests/cases/compiler/conflictMarkerTrivia2.ts(3,1): error TS1185: Merge conflict marker encountered.
2+
tests/cases/compiler/conflictMarkerTrivia2.ts(4,6): error TS2304: Cannot find name 'a'.
3+
tests/cases/compiler/conflictMarkerTrivia2.ts(6,1): error TS1185: Merge conflict marker encountered.
4+
tests/cases/compiler/conflictMarkerTrivia2.ts(7,6): error TS2391: Function implementation is missing or not immediately following the declaration.
5+
tests/cases/compiler/conflictMarkerTrivia2.ts(9,1): error TS1185: Merge conflict marker encountered.
6+
tests/cases/compiler/conflictMarkerTrivia2.ts(11,3): error TS1128: Declaration or statement expected.
7+
tests/cases/compiler/conflictMarkerTrivia2.ts(11,10): error TS2304: Cannot find name 'bar'.
8+
tests/cases/compiler/conflictMarkerTrivia2.ts(11,16): error TS1005: ';' expected.
9+
tests/cases/compiler/conflictMarkerTrivia2.ts(12,1): error TS1128: Declaration or statement expected.
10+
11+
12+
==== tests/cases/compiler/conflictMarkerTrivia2.ts (9 errors) ====
13+
class C {
14+
foo() {
15+
<<<<<<< B
16+
~~~~~~~
17+
!!! error TS1185: Merge conflict marker encountered.
18+
a();
19+
~
20+
!!! error TS2304: Cannot find name 'a'.
21+
}
22+
=======
23+
~~~~~~~
24+
!!! error TS1185: Merge conflict marker encountered.
25+
b();
26+
~
27+
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
28+
}
29+
>>>>>>> A
30+
~~~~~~~
31+
!!! error TS1185: Merge conflict marker encountered.
32+
33+
public bar() { }
34+
~~~~~~
35+
!!! error TS1128: Declaration or statement expected.
36+
~~~
37+
!!! error TS2304: Cannot find name 'bar'.
38+
~
39+
!!! error TS1005: ';' expected.
40+
}
41+
~
42+
!!! error TS1128: Declaration or statement expected.
43+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class C {
2+
foo() {
3+
<<<<<<< B
4+
a();
5+
}
6+
=======
7+
b();
8+
}
9+
>>>>>>> A
10+
11+
public bar() { }
12+
}

0 commit comments

Comments
 (0)