You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the below code, the type of x is set to Foo even though it was declared int and Foo is not in scope.
This causes a compiler crash later when x is used since Foo is a generic and wasn't instantiated.
Example
block:
typeFoo[n: staticint] =intblock:
static:
let x =int1echo x.type# Foo block:
static:
let x =int1let y = x +1# Error: unhandled exception: value out of range: -8 notin 0 .. 65535 [RangeDefect] echo y
Current Output
Foo
fatal.nim(53) sysFatal
Error: unhandled exception: value out of range: -8 notin 0 .. 65535 [RangeDefect]
In the below code, the type of
x
is set toFoo
even though it was declaredint
andFoo
is not in scope.This causes a compiler crash later when
x
is used sinceFoo
is a generic and wasn't instantiated.Example
Current Output
Expected Output
Possible Solution
Additional Information
This happens on devel, 1.6 and 1.4.
This is related to #15356.
The text was updated successfully, but these errors were encountered: