edwadli / note-hashtag

3 stars 0 forks source link

Cannot reference type properties when stored in array #127

Closed kevin1 closed 8 years ago

kevin1 commented 8 years ago
type t = {
  a = "hi"
}

t = { (init t) (init t) }
PrintEndline t.(0).a

gives the following error: "Incorrect types passed into function PrintEndline"

However, changing the last line to PrintEndline (t.(0).a) gives "a referenced before initalization"

kevin1 commented 8 years ago

Once this is fixed, the test array_music_pitch can be less stupid

kevin1 commented 8 years ago

I'm an idiot -- keep forgetting we use $ rather than . for properties. Once I filed #128 I realized that was the real problem.