View Issue Details

IDProjectCategoryView StatusLast Update
0031707FPCFCLpublic2017-04-25 15:37
ReporterAndrey ZubarevAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
Product VersionProduct Build 
Target Version3.2.0Fixed in Version3.1.1 
Summary0031707: fcl-passrc error on class functions in objects
Description{$mode objfpc}
unit test;
interface
type
    UTF8 = object
    const
        MaxCharLen = 4;
        BOM = #$EF#$BB#$BF;
    type
        CharBytes = type string[MaxCharLen];
        Statistics = record
            n: array[1 .. MaxCharLen] of uint;
        end;
    var
        class function Validate(const s: string): boolean; static;
        class function Validate(s: pChar; len: size_t): boolean; static;
        class function GetStatistics(const s: string): Statistics; static;
        class function Codepoints(s: pChar; len: size_t): uint; static;
        class function Codepoints(const s: string): uint; static;
        class function Next(const s: string; var pos: sint): UTFchar; static;
        class function Next(const s: string; var pos: sint; out sym: UTFchar): UTFchar; static; cinline
        class function Next(var s: pChar; var cb: size_t): UTFchar; static;
        class function Prev(const s: string; var pos: sint): UTFchar; static;
        class function Prev(const s: string; var pos: sint; out sym: UTFchar): UTFchar; static; cinline
        class function Peek(const s: string; pos: sint): UTFchar; static; cinline
        class function Peek(const s: string; pos: sint; out len: size_t): UTFchar; static; cinline
        class function Peek(const s: string; pos: sint; out sym: UTFchar): UTFchar; static; cinline
        class function Peek(const s: string; pos: sint; out len: size_t; out sym: UTFchar): UTFchar; static; cinline
        class function CodepointToString(const char: UTFchar; syms: pChar): sint; static;
        class function CodepointToString(const char: UTFchar): CharBytes; static; cinline
        class function IsEOL(s: pChar; len: size_t; out eolen: size_t): boolean; static;
    private
        class function ToStringError(const char: UTFchar; const what: string): Exception; static;
    end;
implementation
end.

Gives Parser error: "Expected "Identifier" at token "class" in file E:\zcad\other\pudgb\passrcerrors.pas at line 15 column 7"
TagsNo tags attached.
Fixed in Revision35949
FPCOldBugId
FPCTarget
Attached Files

Relationships

related to 0031710 closedMichael Van Canneyt fcl-passrc error 'var' keyword before methods in class and objects 

Activities

Andrey Zubarev

2017-04-24 19:31

reporter   ~0099876

Same error in class

Michael Van Canneyt

2017-04-25 14:26

administrator   ~0099922

Fixed by fix for 31710.

Andrey Zubarev

2017-04-25 15:37

reporter   ~0099928

Thanks!

Issue History

Date Modified Username Field Change
2017-04-24 19:28 Andrey Zubarev New Issue
2017-04-24 19:31 Andrey Zubarev Note Added: 0099876
2017-04-24 22:50 Michael Van Canneyt Assigned To => Michael Van Canneyt
2017-04-24 22:50 Michael Van Canneyt Status new => assigned
2017-04-25 14:26 Michael Van Canneyt Fixed in Revision => 35949
2017-04-25 14:26 Michael Van Canneyt Note Added: 0099922
2017-04-25 14:26 Michael Van Canneyt Status assigned => resolved
2017-04-25 14:26 Michael Van Canneyt Fixed in Version => 3.1.1
2017-04-25 14:26 Michael Van Canneyt Resolution open => fixed
2017-04-25 14:26 Michael Van Canneyt Target Version => 3.2.0
2017-04-25 14:26 Michael Van Canneyt Relationship added related to 0031710
2017-04-25 15:37 Andrey Zubarev Note Added: 0099928
2017-04-25 15:37 Andrey Zubarev Status resolved => closed