Skip to content

Commit

Permalink
fixed line break in type parameter constraint
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Dec 11, 2024
1 parent cad782a commit ba68bbf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## dev branch / next version (1.x.x)

- added indentOffset to support code snippets with non-zero indentation levels
- fixed line break in type parameter constraint

## version 1.17.1 (2024-10-22)

Expand Down
1 change: 1 addition & 0 deletions src/formatter/marker/MarkLineEnds.hx
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ class MarkLineEnds extends MarkerBase {
case Comma:
case Semicolon:
case Arrow:
case Binop(OpAnd):
case Binop(OpAssign):
case Binop(OpGt):
case Const(CIdent("is")):
Expand Down
14 changes: 14 additions & 0 deletions test/testcases/lineends/simons_type_parameter_constraints.hxtest
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
}

---

function hasIdent<T, O:{} & T>(name:T):T {
return false;
}

---

function hasIdent<T, O:{} & T>(name:T):T {
return false;
}

0 comments on commit ba68bbf

Please sign in to comment.