diff --git a/Project.toml b/Project.toml index f471a005..86078828 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GPUCompiler" uuid = "61eb1bfa-7361-4325-ad38-22787b887f55" -authors = ["Tim Besard "] version = "1.5.1" +authors = ["Tim Besard "] [deps] ExprTools = "e2ba6199-217a-4e67-a87a-7c52f15ade04" diff --git a/src/mangling.jl b/src/mangling.jl index 0fc69165..2baefcb1 100644 --- a/src/mangling.jl +++ b/src/mangling.jl @@ -10,12 +10,16 @@ safe_name(fn::String) = replace(fn, r"[^A-Za-z0-9]"=>"_") safe_name(t::DataType) = safe_name(String(nameof(t))) function safe_name(t::Type{<:Function}) # like Base.nameof, but for function types - mt = t.name.mt - fn = if mt === Symbol.name.mt - # uses shared method table, so name is not unique to this function type - nameof(t) + fn = if VERSION >= v"1.13.0-DEV.647" + t.name.singletonname else - mt.name + mt = t.name.mt + if mt === Symbol.name.mt + # uses shared method table, so name is not unique to this function type + nameof(t) + else + mt.name + end end safe_name(string(fn)) end