CodeTools fail on case-of after types/constants in advanced records
Original Reporter info from Mantis: creaothceann
-
Reporter name:
Original Reporter info from Mantis: creaothceann
- Reporter name:
Description:
When declaring an advanced record (i.e. it contains types and/or constants in addition to variables) with a variant part ("case ordinal_type of ..."), one has to re-introduce the variables section with the "var" keyword before starting the case-of part.
The bug is that Lazarus' Identifier Completion doesn't seem to understand the syntax.
Steps to reproduce:
type r = record
type w = word;
var case integer of
0: (a : byte);
1: (b : byte);
end;
- invoke Identifier Completion with CTRL+SPACE (default key mapping)
- this creates the error "Case only allowed in records" and puts the text cursor on the "case"
Mantis conversion info:
- Mantis ID: 36795
- OS: Windows
- OS Build: 10
- Build: lazarus 62131 fpc 43271
- Platform: x64-64
- Version: 2.0.6
- Fixed in revision: r65275 (#57339c6e)
- Monitored by: » creaothceann (creaothceann)