Bug 9348 – "tmpl!arg" syntax followed by "!is" or "!in"

Status
RESOLVED
Resolution
FIXED
Severity
minor
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-01-18T07:54:00Z
Last change time
2013-02-11T22:49:53Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
avinesworth

Comments

Comment #0 by avinesworth — 2013-01-18T07:54:31Z
The following code gets rejected: @property Object F(int E)() { return null; } unittest { assert (F!0 !is null); } >> Error: multiple ! arguments are not allowed Thoughts: there seems to be some syntactic ambiguity between "!is" as operator and "!" as template parameter list infix. IMHO, the expected behaviour in this case would be not to take operator for template parameter.
Comment #1 by k.hara.pg — 2013-01-18T08:21:02Z
"!in" has same problem. @property Object F(int E)() { return null; } assert (F!0 !in [new Object():1]); https://github.com/D-Programming-Language/dmd/pull/1507
Comment #2 by github-bugzilla — 2013-01-25T07:33:02Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/e127a7d694cd99feca52fedf9c5f8fedc37776eb fix Issue 9348 - "tmpl!arg" syntax followed by "!is" or "!in" https://github.com/D-Programming-Language/dmd/commit/d1af0a7534f5b580a3b61b23163573b642ce40f9 Merge pull request #1507 from 9rnsr/fix9348 Issue 9348 - "tmpl!arg" syntax followed by "!is" or "!in"
Comment #3 by github-bugzilla — 2013-02-11T22:49:53Z