-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
59 additions
and
65 deletions.
There are no files selected for viewing
37 changes: 37 additions & 0 deletions
37
src/main/resources/org/eolang/motives/aliases/broken-alias-first.md
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,37 @@ | ||
# Broken Alias (First Part) | ||
|
||
The first part of the `+alias` meta may only contain the name | ||
of the object, not its FQN. For example, here is how it may look | ||
in EO: | ||
|
||
``` | ||
+alias stdout org.eolang.io.stdout | ||
# Basic object. | ||
[] > foo | ||
stdout | ||
"Hello, world!\n" | ||
``` | ||
|
||
Here, the `stdout` part of the `+alias` meta is the name of the | ||
object used later in the code. It will automatically be replaced | ||
with `org.eolang.io.stdout`. | ||
|
||
The error may also indicate incorrect usage of the `<meta>` element | ||
in XMIR. The alias defined above must look like this, in XMIR: | ||
|
||
```xml | ||
<program> | ||
<metas> | ||
<meta> | ||
<head>alias</head> | ||
<tail>stdout org.eolang.io.stdout</tail> | ||
<part>stdout</part> | ||
<part>org.eolang.io.stdout</part> | ||
</meta> | ||
</metas> | ||
</program> | ||
``` | ||
|
||
Here, the `part` elements in the `meta` element must be used to define | ||
separate parts of the `+alias` meta. |
17 changes: 17 additions & 0 deletions
17
src/main/resources/org/eolang/motives/aliases/broken-alias-second.md
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,17 @@ | ||
# Broken Alias (Second Part) | ||
|
||
The second part of the `+alias` meta may only contain FQN | ||
(fully qualified name) of the object. For example, here is how it may look | ||
in EO: | ||
|
||
``` | ||
+alias stdout org.eolang.io.stdout | ||
# Basic object. | ||
[] > foo | ||
stdout | ||
"Hello, world!\n" | ||
``` | ||
|
||
Here, the `org.eolang.io.stdout` part of the `+alias` meta is the | ||
FQN of the object later in the code referred to as `stdout`. |
46 changes: 0 additions & 46 deletions
46
src/main/resources/org/eolang/motives/aliases/broken-alias.md
This file was deleted.
Oops, something went wrong.
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