Guest User

Untitled

a guest
Apr 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import times
  2. import options
  3.  
  4. type
  5. Entry = object of RootObj
  6. emergeDate: Option[DateTime]
  7. publishDate: Option[DateTime]
  8.  
  9. proc newEntry(): Entry =
  10. # Gives: Error: fields not initialized: emergeDate, publishDate.
  11. result = Entry()
  12.  
  13. ## Gives: Error: cannot instantiate: 'none[DateTime]'
  14. #result = Entry(emergeDate: none[DateTime](), publishDate: none[DateTime]())
Add Comment
Please, Sign In to add comment