Skip to content

Conversation

@carblue
Copy link
Contributor

@carblue carblue commented Mar 19, 2018

Using posix.mak from #6278
make -f posix.mak std/uni.test
results in:
...

T=`mktemp -d /tmp/.dmd-run-test.XXXXXX` &&                                                              \
  (                                                                                                     \
    ../dmd/generated/linux/release/64/dmd -od$T -conf= -I../druntime/import  -w -de -dip25 -m64 -fPIC -transition=complex -O -release -dip1000  -main -unittest generated/linux/release/64/libphobos2.a -defaultlib= -debuglib= -L-ldl -cov -run std/uni.d ;     \
    RET=$? ; rm -rf $T ; exit $RET                                                                   \
  )
std/uni.d(7414): Error: scope variable chars assigned to non-scope parameter inp calling std.uni.Grapheme.opOpAssign!("~", const(dchar)[]).opOpAssign
std/uni.d(8363): Error: template instance `std.uni.Grapheme.__ctor!dchar` error instantiating
std/uni.d(7414): Error: scope variable chars assigned to non-scope parameter inp calling std.uni.Grapheme.opOpAssign!("~", const(int)[]).opOpAssign
std/uni.d(8371): Error: template instance `std.uni.Grapheme.__ctor!int` error instantiating

sources used (on Linux x86_64):
dmd : Latest commit 17bc56c
druntime: Latest commit f2711a3
phobos : Latest commit 6947d80

@DmitryOlshansky
Copy link
Member

Seems harmless. But this is strange though as a template should likely infer scope-ness

@carblue
Copy link
Contributor Author

carblue commented Mar 19, 2018

Yes, I agree about inferring scope for params in templates and it used to be inferred (and probably will be again). Walter is heavily working on safe/scope issues currently, thus this issue may be only temporary; but it's not the only location where I observed changed safe/scope/dip1000 behavior recently.

Copy link
Contributor

@wilzbach wilzbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah the compiler should be smarter :/

@wilzbach wilzbach merged commit b83305a into dlang:master Mar 19, 2018
@carblue carblue deleted the std_uni_dip1000 branch March 19, 2018 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants