https://github.com/JuliaLang/julia
Revision 94c3a153c84b4023e7c36556d3971bd165ebe81b authored by Keno Fischer on 15 September 2022, 05:24:11 UTC, committed by GitHub on 15 September 2022, 05:24:11 UTC
Similar to #46693, but for :new, rather than getfield.
Unfortunately, this is somewhat limited as we don't really
have the ability to encode type equality constraints in the
lattice. In particular, it would be nice to analyze:

```
struct Foo{T}
    x::T
    Foo(x::T) where {T} = new{T}(x)
end
```

and be able to prove this nothrow. If it's really
important, we could probably pattern match it, but
for the moment, this is not easy to do. Nevertheless,
we can do something about the similar, but simpler pattern

```
struct Foo{T}
    x
    Foo(x::T) where {T} = new{T}(x)
end
```

which is what this PR does.
1 parent e758982
History
Tip revision: 94c3a153c84b4023e7c36556d3971bd165ebe81b authored by Keno Fischer on 15 September 2022, 05:24:11 UTC
Improve nothrow analysis of :new with missing sparam (#46754)
Tip revision: 94c3a15
File Mode Size
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.buildkite-external-version -rw-r--r-- 5 bytes
.clang-format -rw-r--r-- 3.3 KB
.codecov.yml -rw-r--r-- 52 bytes
.git-blame-ignore-revs -rw-r--r-- 294 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 493 bytes
.mailmap -rw-r--r-- 12.1 KB
CITATION.bib -rw-r--r-- 513 bytes
CITATION.cff -rw-r--r-- 940 bytes
CONTRIBUTING.md -rw-r--r-- 23.3 KB
HISTORY.md -rw-r--r-- 349.9 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 50.1 KB
Makefile -rw-r--r-- 27.1 KB
NEWS.md -rw-r--r-- 8.0 KB
README.md -rw-r--r-- 7.3 KB
THIRDPARTY.md -rw-r--r-- 3.7 KB
VERSION -rw-r--r-- 10 bytes
julia.spdx.json -rw-r--r-- 35.8 KB
sysimage.mk -rw-r--r-- 4.1 KB

README.md

back to top