Skip to content

Commit

Permalink
fixed contionalised class declaration with constraints, see HaxeCheck…
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Mar 23, 2020
1 parent 65c690c commit 9b332d1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- Fixed keep wrapping with multiline strings, fixes [#561](https://github.com/HaxeCheckstyle/haxe-formatter/issues/561)
- Fixed whitespace of block comment in array literals, fixes [#441](https://github.com/HaxeCheckstyle/haxe-formatter/issues/441)
- Fixed whitespace of conditionalised case
- Fixed contionalised class declaration with constraints, fixes [#431](https://github.com/HaxeCheckstyle/haxe-formatter/issues/431)
- Changed keep-like behaviour of `sameLine.expressionIf` with `same`, fixes [#304](https://github.com/HaxeCheckstyle/haxe-formatter/issues/304) ([#548](https://github.com/HaxeCheckstyle/haxe-formatter/issues/548) + [#550](https://github.com/HaxeCheckstyle/haxe-formatter/issues/550))

## version 1.9.2 (2019-12-19)
Expand Down
4 changes: 4 additions & 0 deletions src/formatter/marker/MarkWhitespace.hx
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ class MarkWhitespace extends MarkerBase {
} else {
policy = policy.remove(After);
}
case Binop(OpGt):
if (TokenTreeCheckUtils.isTypeParameter(next.token)) {
policy = policy.remove(After);
}
default:
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{}

---

#if (haxe_ver >= "4.0.0")
class FlxTypedEmitter<T:FlxSprite & IFlxParticle> extends FlxTypedGroup<T>
#else
class FlxTypedEmitter<T:(FlxSprite, IFlxParticle)> extends FlxTypedGroup<T>
#end
{}


---

#if (haxe_ver >= "4.0.0")
class FlxTypedEmitter<T:FlxSprite & IFlxParticle> extends FlxTypedGroup<T>
#else
class FlxTypedEmitter<T:(FlxSprite, IFlxParticle)> extends FlxTypedGroup<T>
#end
{}

0 comments on commit 9b332d1

Please sign in to comment.