-
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.
147: Detect overlapping field names r=vext01 a=ltratt There are two cases to be dealt with: 1. A field name has already been defined in a superclass (5e00d91). 2. A class defines the same field more than once (9370609). The first of those was pointed out by @Hirevo in SOM-st/SOM#42; the second is a relatively simple variation on the same theme. Co-authored-by: Laurence Tratt <[email protected]>
- Loading branch information
Showing
4 changed files
with
52 additions
and
1 deletion.
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,13 @@ | ||
" | ||
VM: | ||
status: error | ||
stderr: | ||
...test.som', line 10, column 23: | ||
test = test_super ( | a | | ||
Field 'a' is already defined in a superclass. | ||
" | ||
|
||
test = test_super ( | a | | ||
run = ( | ||
) | ||
) |
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,3 @@ | ||
test_super = ( | ||
| a | | ||
) |
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,12 @@ | ||
" | ||
VM: | ||
status: error | ||
stderr: | ||
...instance_fields_overlap2.som', line 11, column 9: | ||
| a a | | ||
Field 'a' has already been defined in this class. | ||
" | ||
|
||
instance_field_overlap2 = ( | ||
| a a | | ||
) |
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