-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
bugSomething isn't workingSomething isn't workingcompiler/semRelated to semantic-analysis system of the compilerRelated to semantic-analysis system of the compiler
Description
Example
type Foo* = object
s: string
func leak*(A: var Foo): var Foo = discard
proc main() =
var a: Foo
echo a.leak().s
main()
Actual Output
Traceback (most recent call last)
test.nim(10) test
test.nim(8) main
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Expected Output
An uninitialized view should be a compile-time error
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingcompiler/semRelated to semantic-analysis system of the compilerRelated to semantic-analysis system of the compiler