resolve failure when setting enum discriminator to a declared const #2428

Closed
msullivan opened this Issue May 22, 2012 · 3 comments

3 participants

@msullivan
const foo: int = 4 >> 1;
enum bs { thing = foo }
fn main() { assert(thing as int == foo); }

fails with

resolve-bug.rs:4:18: 4:21 error: internal error looking up a definition
resolve-bug.rs:4 enum bs { thing = foo }
@msullivan msullivan added a commit that referenced this issue May 22, 2012
@msullivan msullivan Add a test for Issue #2428. 2a9bf09
@catamorphism

Test this again when #1935 is completed.

@bstrie

Still hitting this error despite new resolve.

@catamorphism catamorphism was assigned Oct 8, 2012
@catamorphism

I've fixed this, just waiting for the tree to be open again.

@catamorphism catamorphism added a commit that closed this issue Oct 15, 2012
@catamorphism catamorphism Allow enum discriminator exprs to refer to declared consts
Also some work towards #3521

Closes #2428
7237268
@catamorphism catamorphism was unassigned by msullivan Jun 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment