Skip to content

Commit

Permalink
fix #29064, bug in field name same as struct type name (#29070)
Browse files Browse the repository at this point in the history
(cherry picked from commit cfca833)
  • Loading branch information
JeffBezanson authored and KristofferC committed Sep 10, 2018
1 parent 8c53843 commit f889509
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@
,@(map make-decl field-names field-types))
(block
,@locs
(new ,name ,@field-names))))
(new (outerref ,name) ,@field-names))))
any-ctor)
(list any-ctor))))

Expand Down
6 changes: 6 additions & 0 deletions test/syntax.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1502,6 +1502,12 @@ function test27710()
end
@test test27710() === Int64

# issue #29064
struct X29064
X29064::Int
end
@test X29064(1) isa X29064

# issue #27268
function f27268()
g(col::AbstractArray{<:Real}) = col
Expand Down

0 comments on commit f889509

Please sign in to comment.