forked from xtclang/xvm
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Gene Gleyzer
committed
Jul 17, 2023
1 parent
bce1cc4
commit 7776632
Showing
2 changed files
with
104 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,16 @@ | ||
module TestSimple { | ||
module TestSimple.examples.org { | ||
@Inject Console console; | ||
|
||
package json import json.xtclang.org; | ||
void run() { | ||
String[] strings = ["abc", "def"]; | ||
|
||
import json.*; | ||
Test<String> t = new Test(strings); | ||
String[] filtered = t.filter(s -> s.indexOf("e")).toArray(Constant); // that used to fail at RT | ||
console.print(filtered); | ||
} | ||
|
||
void run() { | ||
String str = \|{ | ||
|"host":"admin.xqiz.it", | ||
|"http":8080, | ||
|"https":8090 | ||
|} | ||
; | ||
Doc doc = new Parser(str.toReader()).parseDoc(); // used to fail to compile (unknown type "Doc") | ||
assert doc.is(Map<String, Doc>); | ||
console.print(doc); | ||
service Test<Element>(Collection<Element> underlying) | ||
implements Collection<Element> | ||
delegates Collection(underlying) { | ||
} | ||
} |