-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'topic/fix_dot_notation' into 'master'
Add support for calls with prefixed-view notation on access, array and scalar types. Closes eng/ide/ada_language_server#1274 See merge request eng/libadalang/libadalang!1502
- Loading branch information
Showing
6 changed files
with
204 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
driver: name-resolution | ||
input_sources: [test.adb] | ||
input_sources: [test.adb, test_access.adb, test_array.adb, test_scalar.adb] |
15 changes: 15 additions & 0 deletions
15
testsuite/tests/name_resolution/prefixed_untagged/test_access.adb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
procedure Test_Access is | ||
package Pkg is | ||
type T is null record; | ||
type T_Access is access all T; | ||
|
||
procedure Foo (Self : T_Access) is null; | ||
end Pkg; | ||
|
||
use Pkg; | ||
|
||
X : T_Access; | ||
begin | ||
X.Foo; | ||
pragma Test_Statement; | ||
end Test_Access; |
16 changes: 16 additions & 0 deletions
16
testsuite/tests/name_resolution/prefixed_untagged/test_array.adb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
procedure Test_Array is | ||
package Pkg is | ||
type T is null record; | ||
type T_Array is array (Positive range <>) of T; | ||
|
||
procedure Foo (Self : T_Array) is null; | ||
end Pkg; | ||
|
||
use Pkg; | ||
|
||
X : T_Array (1 .. 10); | ||
begin | ||
X.Foo; | ||
pragma Test_Statement; | ||
end Test_Array; | ||
|
35 changes: 35 additions & 0 deletions
35
testsuite/tests/name_resolution/prefixed_untagged/test_scalar.adb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
procedure Test_Scalar is | ||
package Pkg is | ||
type Enum_T is (A, B, C); | ||
type Int_T is range 1 .. 10; | ||
type Mod_T is mod 3; | ||
type Fixed_T is delta 0.1 range 0.0 .. 10.0; | ||
type Float_T is digits 8; | ||
|
||
procedure Foo (Self : Enum_T) is null; | ||
procedure Foo (Self : Int_T) is null; | ||
procedure Foo (Self : Mod_T) is null; | ||
procedure Foo (Self : Fixed_T) is null; | ||
procedure Foo (Self : Float_T) is null; | ||
end Pkg; | ||
|
||
use Pkg; | ||
|
||
X_1 : Enum_T; | ||
X_2 : Int_T; | ||
X_3 : Mod_T; | ||
X_4 : Fixed_T; | ||
X_5 : Float_T; | ||
begin | ||
X_1.Foo; | ||
pragma Test_Statement; | ||
X_2.Foo; | ||
pragma Test_Statement; | ||
X_3.Foo; | ||
pragma Test_Statement; | ||
X_4.Foo; | ||
pragma Test_Statement; | ||
X_5.Foo; | ||
pragma Test_Statement; | ||
end Test_Scalar; | ||
|