D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 4062 - can call method without this pointer inside is()
Summary: can call method without this pointer inside is()
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: Other All
: P2 normal
Assignee: No Owner
URL:
Keywords: accepts-invalid, rejects-valid
: 4545 (view as issue list)
Depends on:
Blocks:
 
Reported: 2010-04-05 03:47 UTC by nfxjfg
Modified: 2014-09-15 07:57 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description nfxjfg 2010-04-05 03:47:40 UTC
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 Walter Bright 2011-04-05 22:48:42 UTC
It's definitely a bug. Fixing it requires moving the check for the error from e2ir.c to semantic().
Comment 2 yebblies 2012-01-30 19:19:14 UTC
*** Issue 4545 has been marked as a duplicate of this issue. ***
Comment 3 Kenji Hara 2014-09-15 07:57:49 UTC
Fixed from 2.063.