Bug 4062 – can call method without this pointer inside is()

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
Other
OS
All
Creation time
2010-04-05T03:47:00Z
Last change time
2014-09-15T07:57:49Z
Keywords
accepts-invalid, rejects-valid
Assigned to
nobody
Creator
nfxjfg

Comments

Comment #0 by nfxjfg — 2010-04-05T03:47:40Z
The following compiles. Not sure if this is a bug or a feature, so I'm reporting this as a bug. Close as invalid if it's actually a feature. class X { void x(int a) { } } void main() { static assert(is( typeof({ X.x(1); }) )); }
Comment #1 by bugzilla — 2011-04-05T22:48:42Z
It's definitely a bug. Fixing it requires moving the check for the error from e2ir.c to semantic().
Comment #2 by yebblies — 2012-01-30T19:19:14Z
*** Issue 4545 has been marked as a duplicate of this issue. ***
Comment #3 by k.hara.pg — 2014-09-15T07:57:49Z
Fixed from 2.063.