Skip to content

Commit 4a9f7cf

Browse files
authored
Fix on nightly (#28)
* Fix on nightly * Test more versions
1 parent 4f422c5 commit 4a9f7cf

File tree

3 files changed

+16
-5
lines changed

3 files changed

+16
-5
lines changed

.appveyor.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
environment:
22
matrix:
3-
- julia_version: 1
3+
- julia_version: 1.0
44
- julia_version: 1.1
55
- julia_version: 1.2
6+
- julia_version: 1.3
7+
- julia_version: 1
68
- julia_version: nightly
79

810
platform:

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ julia:
88
- 1.0
99
- 1.1
1010
- 1.2
11+
- 1.3
12+
- 1
1113
- nightly
1214

1315
branches:

src/LoweredCodeUtils.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,17 @@ end
172172
##
173173
function isanonymous_typedef(src::CodeInfo)
174174
length(src.code) >= 4 || return false
175-
stmt = src.code[end-1]
176-
isexpr(stmt, :struct_type) || return false
177-
name = stmt.args[1]::Symbol
178-
return startswith(String(name), "#")
175+
if VERSION >= v"1.5.0-DEV.702"
176+
stmt = src.code[end-1]
177+
(isexpr(stmt, :call) && is_global_ref(stmt.args[1], Core, :_typebody!)) || return false
178+
name = stmt.args[2]::Symbol
179+
return startswith(String(name), "#")
180+
else
181+
stmt = src.code[end-1]
182+
isexpr(stmt, :struct_type) || return false
183+
name = stmt.args[1]::Symbol
184+
return startswith(String(name), "#")
185+
end
179186
end
180187

181188
function define_anonymous(@nospecialize(recurse), frame, stmt)

0 commit comments

Comments
 (0)