Created
April 11, 2018 11:26
-
-
Save enthus1ast/27e45da51cc23639eb678bae6673d9bd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment