File tree Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Expand file tree Collapse file tree 3 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ pub type Name = String
2+ pub type EmployeeId = Int
3+
4+ pub fn main ( ) {
5+ let employee : Name = "John"
6+ let id : EmployeeId = 3243296
7+
8+ let string_type : String = "John"
9+ let int_type : Int = 3243296
10+
11+ echo string_type == employee
12+ echo int_type == id
13+ }
Original file line number Diff line number Diff line change 1+ pub type Spaceship {
2+ Rocket ( name : String , weight : Float , fuel_capacity : Float )
3+ Ufo ( name : String , weight : Float , fuel_capacity : Float )
4+ Spaceshuttle ( name : String , weight : Float , fuel_capacity : Float )
5+ }
6+
7+ pub fn main ( ) {
8+ let rocket = Rocket ( name : "Odyssey" , weight : 234.53 , fuel_capacity : 593.34 )
9+ let ufo = Ufo ( name : "Odyssey" , weight : 123.6 , fuel_capacity : 0.0 )
10+
11+ let first_spaceshuttle =
12+ Spaceshuttle ( name : "StarReacher 11" , weight : 726.36 , fuel_capacity : 1571.34 )
13+ let second_spaceshuttle =
14+ Spaceshuttle ( .. first_spaceshuttle , name : "StarReacher 16" )
15+
16+ echo rocket
17+ echo ufo
18+ echo first_spaceshuttle
19+ echo second_spaceshuttle
20+ }
Original file line number Diff line number Diff line change @@ -37,7 +37,9 @@ gleam run -m triple_pipelines |
3737gleam run - m triple |
3838 Compare-Object (Get-Content " $PSScriptRoot \..\test\triple_expected" ) |
3939 Assert-MatchTests &&
40+ gleam run - m type_aliases &&
4041gleam run - m type_enum &&
42+ gleam run - m type_record &&
4143gleam run - m unqualified_imports &&
4244ForEach-Object ' foo' ;
4345
You can’t perform that action at this time.
0 commit comments