Fix compile error & add extra comment

This commit is contained in:
Gender Demon 2021-05-26 16:50:59 +01:00
parent 0247b30479
commit e7f68a4647
2 changed files with 7 additions and 3 deletions

View File

@ -10,9 +10,12 @@ primitive ColourList
fun apply(): Array[Colour] =>
[Red; Green; Blue]
for colour in ColourList().values() do
end
actor Main
new create(env: Env) =>
for colour in ColourList().values() do
env.out.print("I should be printing a colour
but I don't know how to cast to string")
end
// Type aliases can also be used to give simpler names to complex types
interface HasName

View File

@ -8,6 +8,7 @@ x = ("hi", 3)
x = ("bye", 7)
// Pony supports tuple unpacking but calls it "destructuring"
// This assigns "bye" to y and 7 to z
(var y, var z) = x
// You can access the elements of tuples directly using this