-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ref. #243
- Loading branch information
Showing
3 changed files
with
70 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
-- error: dependency cycle | ||
with Multiple_Errors; | ||
|
||
-- error: RFLX prefix not allowed | ||
-- error: Package identifier inconsistent with file name | ||
package RFLX_Invalid is | ||
|
||
type R is range 5 .. 23 with Size => 16; | ||
type R_Array is array of R; | ||
|
||
-- error: Type exceeds limit | ||
type S is mod 2**128; | ||
|
||
-- error: Duplicate type | ||
type R is (R_E1, R_E2) with Size => 8; | ||
|
||
-- error: Redefinition of built-in type | ||
type Boolean is (Foo, Bar) with Size => 12; | ||
|
||
-- error: Conflicting literals | ||
type R2 is (R2_E1, R2_E2, Foo) with Size => 24; | ||
|
||
type M1 is | ||
message | ||
null | ||
then X | ||
with Length => 2 * 8; | ||
-- error: Aggregate element out of range (2 times) | ||
X : Opaque | ||
then Y | ||
with Length => 5 * 8 | ||
if X = (1, 256, 20, 500); | ||
-- error: Aggregate element out of range (3 times) | ||
Y : R_Array | ||
then null if Y = (1, 10, 20, 50, 60); | ||
end message; | ||
|
||
type M2 is | ||
message | ||
-- error: Undefined component type | ||
Z : Undef_Type | ||
-- error: Undefined component | ||
then X; | ||
end message; | ||
|
||
-- error: End identifier inconsistent with package identifier | ||
end Inconsistent; |
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,13 @@ | ||
package Parse_Error_Aggregate_Non_Number is | ||
|
||
type M is | ||
message | ||
null | ||
then X | ||
with Length => 2 * 8; | ||
X : Opaque | ||
-- error: Element is no number | ||
then null if X = (1, 100, foo); | ||
end message; | ||
|
||
end Parse_Error_Aggregate_Non_Number; |
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,10 @@ | ||
package Parse_Error_Invalid_Location is | ||
|
||
type M is | ||
message | ||
Y : Boolean | ||
then null | ||
with Invalid => 5; | ||
end message; | ||
|
||
end Parse_Error_Invalid_Location; |