Skip to content

Commit

Permalink
Failing test for symmetryinvestments#271
Browse files Browse the repository at this point in the history
  • Loading branch information
atilaneves committed Oct 30, 2020
1 parent 3e8bc99 commit 750f5b9
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
7 changes: 6 additions & 1 deletion examples/issues/source/issues.d
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export ref const(IssueString) returnsRefConstString() {
return ret;
}


export const(IssueString) returnsConstString() {
return const IssueString("toto");
}
Expand Down Expand Up @@ -289,3 +288,9 @@ struct MethodWithScopeSafeDelegate {
struct Issue268 {
int i;
}


struct Issue271 {
string value;
alias value this;
}
14 changes: 14 additions & 0 deletions tests/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,3 +276,17 @@ def test_issue_268():
else:
with pytest.raises(AssertionError):
assert Issue268(42) == Issue268(42)


def test_issue_271():
import pytest
if is_pyd:
with pytest.raises(ImportError):
from issues import Issue271
i = Issue271("foobar")
assert i.length == 6
else:
from issues import Issue271
i = Issue271("foobar")
with pytest.raises(AttributeError):
assert i.length == 6

0 comments on commit 750f5b9

Please sign in to comment.