[Issue 11614] Error: this for _expand_field_0 needs to be type Tuple not type Foo

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Nov 30 12:25:18 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=11614



--- Comment #2 from github-bugzilla at puremagic.com 2013-11-30 12:25:16 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/c2ba89dc203c34740fbc21d8a116994046a7bbf4
fix Issue 11614 - Error: this for _expand_field_0 needs to be type Tuple not
type Foo

Even if a variable has no valid context, it would be either:

1. a part of compile time evaluated expression, which is used as unreal
context.
    enum x = Type.fieldvar.sizeof;
    // It's legitimate expression so fieldvar is not evaluated
    // in runtime.

2. or an invalid field access without valid 'this', in runtime evaluated
expression.
    int y = Type.fieldvar;
    // It's invalid expression so fieldvar access has no valid 'this'.

For the case #2, it will be an error by `checkRightThis` later. Therefore
`getRightThis` should not make it an error.

https://github.com/D-Programming-Language/dmd/commit/4d994d640f32a50e3bfb84c5e99118c7a057cce4
Merge pull request #2897 from 9rnsr/fix11614

[REG2.064] Issue 11614 - Error: this for _expand_field_0 needs to be type Tuple
not type Foo

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list