-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@compat get for Nullable types throws a BoundsError #228
Comments
Argh, looks like the new compatibility for @timholy Any ideas? @BenLauwens Do you really need |
I removed the @compat and get works fine on Julia v0.3. The issue can be closed. Ben |
@nalimilan: Another reason not to have one-argument |
I am the maintainer of SimJulia and recently the @compat macro for getting a Nullable type in Julia v0.3 and Julia v0.4 throws a BoundsError.
I isolated the problem with following small example:
`using Compat
type Test
a :: Float64
end
type TestCompat
t :: @compat Nullable{Test}
function TestCompat()
tc = new()
tc.t = @compat Nullable{Test}()
return tc
end
end
tc = TestCompat()
@compat get(tc.t)`
In Julia v0.4 without the @compat macro everything works fine (a NullException is thrown) but with the macro I get the following error message:
ERROR: LoadError: BoundsError: attempt to access 2-element Array{Any,1}:
:get
:(tc.t)
at index [3]
The text was updated successfully, but these errors were encountered: