Skip to content

Commit

Permalink
Class with augmentation case (fix fsprojects#239)
Browse files Browse the repository at this point in the history
  • Loading branch information
jindraivanek committed May 6, 2018
1 parent f87cbab commit 09efa8d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Fantomas/CodePrinter.fs
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,14 @@ and genTypeDefn astContext (TypeDef(ats, px, ao, tds, tcs, tdr, ms, s)) =

| ObjectModel(TCDelegate(FunType ts), _) ->
typeName +> sepEq +> sepSpace -- "delegate of " +> genTypeList astContext ts

| ObjectModel(TCSimple TCUnspecified, MemberDefnList(impCtor, others)) when not(List.isEmpty ms) ->
typeName +> opt sepNone impCtor (genMemberDefn { astContext with IsInterface = false }) +> sepEq +> indent
+> genMemberDefnList { astContext with IsInterface = false } others +> sepNln
-- "with" +> indent
+> genMemberDefnList { astContext with IsInterface = false } ms +> unindent
+> unindent

| ObjectModel(_, MemberDefnList(impCtor, others)) ->
typeName +> opt sepNone impCtor (genMemberDefn { astContext with IsInterface = false }) +> sepEq +> indent
+> genMemberDefnList { astContext with IsInterface = false } others +> unindent
Expand Down

0 comments on commit 09efa8d

Please sign in to comment.