Menu

#30 Formatter bug with generics

Closed
closed-fixed
None
5
2019-09-12
2017-02-26
No

There is a bug in the formatter with Generics:

Before:
m_aa: TDictionary<dword, tlist\<pointer="">>;</dword,>

After:
m_aa: TDictionary<dword, tlist\<pointer=""> >;</dword,>

There shouldn't be these two spaces in front of the closing ">" (see also attached image)

(originally reported by fishseewater via email)

1 Attachments

Discussion

  • Thomas Mueller

    Thomas Mueller - 2017-02-26
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -4,8 +4,8 @@
     m_aa: TDictionary<DWORD, TList<Pointer>>;
    
     After:
    -m_aa: TDictionary<DWORD, TList<Pointer** > >**;
    +m_aa: TDictionary<DWORD, TList<Pointer > >;
    
    -There shouldn't be these two spaces in front of the closing ">"
    +There shouldn't be these two spaces in front of the closing ">" (see also attached image)
    
     (originally reported by fishseewater via email)
    
    • Attachments has changed:

    Diff:

    --- old
    +++ new
    @@ -0,0 +1 @@
    +Formatter-bug-in-generics.png (6.9 kB; image/png)
    
     
  • Thomas Mueller

    Thomas Mueller - 2017-02-26
    • Group: Closed --> New
     
  • maf-soft

    maf-soft - 2018-03-21

    I have similar generics spacing problems all over the place, not only in special cases:

        function FuncA < T: TMyClass > (out AResult: T): Boolean;
        function FuncB < T > : T;
        function FuncC<T > (const Default: T): T;
    
        ProcD<T > (xxx);
        if Source is TSomething < T > then ...
    

    Version 1.3.8.50

     
  • Thomas Mueller

    Thomas Mueller - 2019-09-08
    • status: open --> closed-fixed
    • assigned_to: Thomas Mueller
    • Group: New --> Closed
     
  • Thomas Mueller

    Thomas Mueller - 2019-09-08

    fixed in revsion #2721

     
    • maf-soft

      maf-soft - 2019-09-09

      Thanks, it works for function declarations now, but still not when those functions are called from code like in my examples above.
      (in GExperts 1.3.14 experimental twm 2019-09-08)

       

      Last edit: maf-soft 2019-09-09
      • Thomas Mueller

        Thomas Mueller - 2019-09-12

        Please create a new bug report for this and provide some examples how they should be formatted. (I have a hard time finding these problems because I don't use generices that often.)

         

Log in to post a comment.

MongoDB Logo MongoDB