Skip to content

Commit

Permalink
extended generics test
Browse files Browse the repository at this point in the history
  • Loading branch information
mgerhold committed Nov 16, 2023
1 parent 9bb770a commit 16fb309
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
20 changes: 20 additions & 0 deletions test/generics.las
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,23 @@ function f(n: I32) {
let words = ["a", "b"];
f(words.size);
struct GenericStruct {
number: I32,
value: ?,
}
struct Person {
name: String,
age: I32,
}
let s = new GenericStruct{
number: 42,
value: new Person{
name: "Claus Kleber",
age: 67,
}
};
println(s);
3 changes: 2 additions & 1 deletion test/generics_expected.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ test:sentence:with:words
[1, 2, 3] <-> [4, 5, 6] <-> [7, 8, 9]
3
Hello, World!
The answer is 42
The answer is 42
struct GenericStruct(number: 42, value: struct Person(name: Claus Kleber, age: 67))

0 comments on commit 16fb309

Please sign in to comment.