Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import times
- import options
- type
- Entry = object of RootObj
- emergeDate: Option[DateTime]
- publishDate: Option[DateTime]
- proc newEntry(): Entry =
- # Gives: Error: fields not initialized: emergeDate, publishDate.
- result = Entry()
- ## Gives: Error: cannot instantiate: 'none[DateTime]'
- #result = Entry(emergeDate: none[DateTime](), publishDate: none[DateTime]())
Add Comment
Please, Sign In to add comment