Skip to content

Commit

Permalink
Merge pull request #17406 from JuliaLang/jb/typedeflowering
Browse files Browse the repository at this point in the history
fix #16793, assertion failure in `@test abstract Foo`
  • Loading branch information
JeffBezanson authored Jul 20, 2016
2 parents d3a8988 + 37b2d43 commit 80fcb57
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/julia-syntax.scm
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@
(receive
(params bounds) (sparam-name-bounds params '() '())
`(block
(const ,name)
(global ,name) (const ,name)
(scope-block
(block
,@(map (lambda (v) `(local ,v)) params)
Expand All @@ -843,7 +843,7 @@
(receive
(params bounds) (sparam-name-bounds params '() '())
`(block
(const ,name)
(global ,name) (const ,name)
(scope-block
(block
,@(map (lambda (v) `(local ,v)) params)
Expand Down Expand Up @@ -3235,7 +3235,9 @@ f(x) = yt(x)

;; top level expressions returning values
((abstract_type bits_type composite_type thunk toplevel module)
(if tail (emit-return e) (emit e)))
(emit e)
(if tail (emit-return '(null)))
'(null))

;; other top level expressions and metadata
((import importall using export line meta inbounds boundscheck simdloop)
Expand Down
8 changes: 8 additions & 0 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4395,6 +4395,14 @@ let g = f16340(1)
@test isa(typeof(g).name.mt.defs.tvars, TypeVar)
end

# issue #16793
try
abstract T16793
catch
end
@test isa(T16793, Type)
@test isa(abstract T16793_2, Void)

# issue #17147
f17147(::Tuple) = 1
f17147{N}(::Vararg{Tuple,N}) = 2
Expand Down

0 comments on commit 80fcb57

Please sign in to comment.