https://github.com/JuliaLang/julia
Revision b8ca7cfa2c996ff12ed0de6cc61f7fad4d3dfa88 authored by Keno Fischer on 19 January 2023, 13:36:28 UTC, committed by GitHub on 19 January 2023, 13:36:28 UTC
The `new` syntax as well as the implicit inner constructor
introduces an implicit `convert(fieldtype(T, n), x)` for every
field. This convert is generally a no-op (because the fieldtype
comes from the type parameter, which in turn comes from the
type of `x`). However, the compiler cannot prove this and a
`convert` call with unknown types taints all effects. Avoid
that by manually avoiding the `convert` call. It is a bit
ugly, but there isn't really another way to write it at
the moment. In the future we may want to have some nicer
way to disable the implicit generation of `convert` calls.

Co-authored-by: Shuhei Kadowaki <40514306+aviatesk@users.noreply.github.com>
1 parent f9d1b85
History
Tip revision: b8ca7cfa2c996ff12ed0de6cc61f7fad4d3dfa88 authored by Keno Fischer on 19 January 2023, 13:36:28 UTC
Improve effects for pairs(::NamedTuple) (#48344)
Tip revision: b8ca7cf
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-- 507 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.1 KB
HISTORY.md -rw-r--r-- 363.4 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 51.6 KB
Makefile -rw-r--r-- 30.0 KB
NEWS.md -rw-r--r-- 1.5 KB
README.md -rw-r--r-- 7.3 KB
THIRDPARTY.md -rw-r--r-- 3.7 KB
VERSION -rw-r--r-- 11 bytes
julia.spdx.json -rw-r--r-- 35.8 KB
sysimage.mk -rw-r--r-- 4.1 KB

README.md

back to top