Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion LanguageFeatures/Patterns/object_A01_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ String test(Shape shape) {
=> "record = ${x1.toInt()}",
Rectangle(sizeAsInt: 10, areaAsRecord: (area: 1)) => "record-2",
Square(size: Unit(value: 3)) => "object-1",
Square(sizeAsInt: 4, area: Unit(value: var o1)) => "object-2 = $o1",
Square(sizeAsInt: 4, area: Unit(value: var o1))
=> "object-2 = ${o1.toInt()}",
_ => "default"
};
}
Expand Down
2 changes: 1 addition & 1 deletion LanguageFeatures/Patterns/object_A01_t02.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ String test(Shape shape) {
case Square(size: Unit(value: 3)):
return "object-1";
case Square(sizeAsInt: 4, area: Unit(value: var o1)):
return "object-2 = $o1";
return "object-2 = ${o1.toInt()}";
default:
return "default";
}
Expand Down
2 changes: 1 addition & 1 deletion LanguageFeatures/Patterns/object_A01_t03.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ String test(Shape shape) {
return "object-1";
}
if (shape case Square(sizeAsInt: 4, area: Unit(value: var o1))) {
return "object-2 = $o1";
return "object-2 = ${o1.toInt()}";
}
return "default";
}
Expand Down