diff --git a/base/reflection.jl b/base/reflection.jl index 77de6bdf36cb6..58d9b67e19177 100644 --- a/base/reflection.jl +++ b/base/reflection.jl @@ -340,7 +340,7 @@ fieldoffset(x::DataType, idx::Integer) = (@_pure_meta; ccall(:jl_get_field_offse Determine the declared type of a field (specified by name or index) in a composite DataType `T`. ```jldoctest -julia> immutable Foo +julia> struct Foo x::Int64 y::String end @@ -361,7 +361,7 @@ Get the index of a named field, throwing an error if the field does not exist (w or returning 0 (when err==false). ```jldoctest -julia> immutable Foo +julia> struct Foo x::Int64 y::String end diff --git a/doc/src/manual/modules.md b/doc/src/manual/modules.md index cc8cfe7463447..bbd6b4248b1f6 100644 --- a/doc/src/manual/modules.md +++ b/doc/src/manual/modules.md @@ -21,7 +21,7 @@ importall OtherLib export MyType, foo -type MyType +struct MyType x end diff --git a/examples/queens.jl b/examples/queens.jl index 418637a2be8db..e44e2fd2c083b 100644 --- a/examples/queens.jl +++ b/examples/queens.jl @@ -2,7 +2,7 @@ # n-queens (nqueens) solver, for nsquaresx-by-nsquaresy board -immutable Queen +struct Queen x::Int y::Int end diff --git a/test/core.jl b/test/core.jl index 5b391e02eedad..487ae7edff2a3 100644 --- a/test/core.jl +++ b/test/core.jl @@ -4896,7 +4896,7 @@ foo21568() @test f21568([0]) == 1 # issue #21719 -type T21719{V} +mutable struct T21719{V} f tol::Float64 goal::V diff --git a/test/inference.jl b/test/inference.jl index 318e33c4e552b..a9e846b91229b 100644 --- a/test/inference.jl +++ b/test/inference.jl @@ -740,7 +740,7 @@ let e = code_typed(f21175, ())[1].first.code[1]::Expr end # issue #10207 -type T10207{A, B} +mutable struct T10207{A, B} a::A b::B end diff --git a/test/sparse/sparsevector.jl b/test/sparse/sparsevector.jl index 6b8f20eaf0afa..543b7668160fd 100644 --- a/test/sparse/sparsevector.jl +++ b/test/sparse/sparsevector.jl @@ -1124,7 +1124,7 @@ end @test issparse([sprand(10,.1); rand(10)]) -type t20488 end +mutable struct t20488 end @testset "similar" begin x = sparsevec(rand(3) .+ 0.1) diff --git a/test/subtype.jl b/test/subtype.jl index 7233b9054e05f..2c74f70ffc4bd 100644 --- a/test/subtype.jl +++ b/test/subtype.jl @@ -1102,7 +1102,7 @@ end # issue #21613 abstract type A21613{S <: Tuple} end -immutable B21613{S <: Tuple, L} <: A21613{S} +struct B21613{S <: Tuple, L} <: A21613{S} data::NTuple{L,Float64} end @testintersect(Tuple{Type{B21613{Tuple{L},L}} where L, Any},