new intellisense tests

This commit is contained in:
Бондарев Иван 2016-05-06 14:29:47 +02:00
parent ec56dc31d2
commit 89c7abd85c
5 changed files with 46 additions and 4 deletions

View file

@ -1928,7 +1928,7 @@ namespace PascalABCCompiler.Parsers
protected virtual string GetDescriptionForShortString(IShortStringScope scope) protected virtual string GetDescriptionForShortString(IShortStringScope scope)
{ {
return "string "+"["+scope.Length+"]"; return "string"+"["+scope.Length+"]";
} }
public string GetSynonimDescription(ITypeScope scope) public string GetSynonimDescription(ITypeScope scope)

View file

@ -1,5 +1,3 @@
{$reference System.Core.dll}
uses System, System.Collections.Generic; uses System, System.Collections.Generic;
type TArr = array of integer; type TArr = array of integer;

View file

@ -1,6 +1,18 @@
type TClass = class type TClass = class
end; end;
type
TArr = array of integer;
TSet = set of byte;
TArr2 = array[,] of TArr;
TArr3 = array[1..10] of string;
TStr = string[5];
begin begin
var t: TClass{@class TClass@}; var t: TClass{@class TClass@};
var t1: TArr{@type TArr = array of integer@};
var t2: TSet{@type TSet = set of byte@};
var t3: TArr2{@type TArr2 = array[,] of TArr@};
var t4: TArr3{@type TArr3 = array[1..10] of string@};
var t5: TStr{@type TStr = string[5]@};
end. end.

View file

@ -0,0 +1,32 @@
function Test(a: integer): integer;
begin
end;
function Test(a: real): integer;
begin
end;
function Test(a: string): integer;
begin
end;
function Test(a: boolean): integer;
begin
end;
function Test(a: List<integer>): integer;
begin
end;
begin
Test{@function Test(a: integer): integer;@}(23);
Test{@function Test(a: real): integer;@}(2.3);
Test{@function Test(a: string): integer;@}('333');
Test{@function Test(a: boolean): integer;@}(true);
Test{@function Test(a: List<integer>): integer;@}(Lst(2,3,4));
end.

View file

@ -5,7 +5,7 @@ begin
var a4{@var a4: real;@} := 2.3; var a4{@var a4: real;@} := 2.3;
var a5{@var a5: boolean;@} := true; var a5{@var a5: boolean;@} := true;
var a6{@var a6: byte;@}: byte; var a6{@var a6: byte;@}: byte;
var a7{@var a7: string [5];@}: string[5]; var a7{@var a7: string[5];@}: string[5];
var a8{@var a8: List<integer>;@} := new List<integer>; var a8{@var a8: List<integer>;@} := new List<integer>;
var a9{@var a9: real;@} := 2+3.4; var a9{@var a9: real;@} := 2+3.4;
var a10{@var a10: List<integer>;@} := a8+2; var a10{@var a10: List<integer>;@} := a8+2;