Bug 9619 – Failed struct field typeof in inner function

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-28T19:48:00Z
Last change time
2013-03-01T06:28:31Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2013-02-28T19:48:50Z
struct Foo { int x; } void main() { void bar() { typeof(Foo.x) y; } } DMD 2.063alpha gives: test.d(4): Error: this is not in a class or struct scope test.d(4): Error: 'this' is only defined in non-static member functions, not bar
Comment #1 by k.hara.pg — 2013-02-28T19:59:19Z
Comment #2 by github-bugzilla — 2013-03-01T01:31:58Z