Skip to content

[REG2.067a] Issue 14198 - Link failure with Variant - #4464

Merged
WalterBright merged 3 commits into
dlang:masterfrom
9rnsr:fix14198
Mar 10, 2015
Merged

WalterBright merged 3 commits into
dlang:masterfrom
9rnsr:fix14198

Conversation

@9rnsr

@9rnsr 9rnsr commented Mar 9, 2015

Copy link
Copy Markdown
Contributor

https://issues.dlang.org/show_bug.cgi?id=14198

After this fix, we can remove the workaround in Phobos.

@MartinNowak MartinNowak self-assigned this Mar 9, 2015
@WalterBright

Copy link
Copy Markdown
Member

The "workaround" stays in Phobos. The original code did memory allocation to implement to!string(bool), which is absurd.

@9rnsr

9rnsr commented Mar 9, 2015

Copy link
Copy Markdown
Contributor Author

The root issue is in std.array.Appender. It always allocate memory. std.format.formatValue is designed not to allocate memory if possible.

@WalterBright

Copy link
Copy Markdown
Member

Thanks for finding & fixing the compiler bug.

WalterBright added a commit that referenced this pull request Mar 10, 2015
[REG2.067a] Issue 14198 - Link failure with Variant
@WalterBright
WalterBright merged commit f22d9db into dlang:master Mar 10, 2015
@MartinNowak

Copy link
Copy Markdown
Member

@9rnsr you think we should get this into 2.067 or will the Phobos workaround suffice?
It changes the internal order of template semantics, so I'm hesitating a little as I don't want to risk a last minute regression.

@9rnsr
9rnsr deleted the fix14198 branch March 10, 2015 16:35
@9rnsr

9rnsr commented Mar 11, 2015

Copy link
Copy Markdown
Contributor Author

@MartinNowak This fix should go into 2.067. There was not only a link-failure issue, but also was incorrect attribute inference problem. Following code does not compile with 2.067-beta2.

import std.conv;
void main() pure @safe { auto s = to!string(true); }

@CyberShadow

Copy link
Copy Markdown
Member

This pull request seems to have fixed a compiler crash (and Phobos-introduced regression):
https://issues.dlang.org/show_bug.cgi?id=14552

9rnsr added a commit to 9rnsr/dmd that referenced this pull request May 31, 2015
…redicate

Just adding a test case so the SEGV problem was already fixed in the PR dlang#4464.
9rnsr added a commit to 9rnsr/dmd that referenced this pull request Aug 27, 2015
9rnsr added a commit to 9rnsr/dmd that referenced this pull request Aug 28, 2015
…ms broken

The broken behavior has been revealed since the commit/PR:

f22d9db
dlang#4464

By the fix, some attribute inference order bug for template functions had
been fixed - when foo() calls bar!(), and bar!() calls baz!(), the bar!()
attribute should be inferred after the attrs of baz!() determined.

And then, compiler infers the purity of nested two lambdas in the 14962
test case, and the case has been rejected by the 14781 behavior.
9rnsr added a commit to 9rnsr/dmd that referenced this pull request Aug 28, 2015
…ms broken

It has been revealed since the commit/PR:

f22d9db
dlang#4464

By the fix, some attribute inference order bug for template functions had
been fixed - when foo() calls bar!(), and bar!() calls baz!(), the bar!()
attribute should be inferred after the attrs of baz!() determined.

And then, compiler infers the purity of nested two lambdas in the 14962
test case, and the case has been rejected by the 14781 behavior.
9rnsr added a commit to 9rnsr/dmd that referenced this pull request Aug 28, 2015
…ms broken

It has been revealed since the commit/PR:

f22d9db
dlang#4464

By the fix, some attribute inference order bug for template functions had
been fixed - when foo() calls bar!(), and bar!() calls baz!(), the bar!()
attribute should be inferred after the attrs of baz!() determined.

And then, compiler infers the purity of nested two lambdas in the 14962
test case, and the case has been rejected by the 14781 behavior.
9rnsr added a commit to 9rnsr/dmd that referenced this pull request Aug 28, 2015
…ms broken

It has been revealed since the commit/PR:

f22d9db
dlang#4464

By the fix, some attribute inference order bug for template functions had
been fixed - when foo() calls bar!(), and bar!() calls baz!(), the bar!()
attribute should be inferred after the attrs of baz!() determined.

And then, compiler infers the purity of nested two lambdas in the 14962
test case, and the case has been rejected by the 14781 behavior.
9rnsr added a commit to 9rnsr/dmd that referenced this pull request Aug 29, 2015
…ms broken

It has been revealed since the commit/PR:

f22d9db
dlang#4464

By the fix, some attribute inference order bug for template functions had
been fixed - when foo() calls bar!(), and bar!() calls baz!(), the bar!()
attribute should be inferred after the attrs of baz!() determined.

And then, compiler infers the purity of nested two lambdas in the 14962
test case, and the case has been rejected by the 14781 behavior.
ldc-bot pushed a commit to ldc-developers/dmd-testsuite that referenced this pull request Sep 24, 2015
…ms broken

It has been revealed since the commit/PR:

f22d9dbb42b6a32d5b4c7c9f3db45e07c9f8aaf6
dlang/dmd#4464

By the fix, some attribute inference order bug for template functions had
been fixed - when foo() calls bar!(), and bar!() calls baz!(), the bar!()
attribute should be inferred after the attrs of baz!() determined.

And then, compiler infers the purity of nested two lambdas in the 14962
test case, and the case has been rejected by the 14781 behavior.
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.

4 participants