Extern const does not work with generics #897

Closed
wants to merge 1 commit into
from

Projects

None yet

2 participants

@zhaihj
Contributor
zhaihj commented Jul 9, 2015
include ./constnum

SIG1: extern const Int

foo: func<T>(a: T){
    match(a){
        case b: Int => "matched!" 
        case => Exception new("error") throw()
    }
}

main: func{ foo(SIG1) }

constnum is an extern c header file:

#define SIG1 1

Because SIG1 is a const, taking reference of it will cause compiler error.

@fasterthanlime
Collaborator

Looks like the travis build is broken, can you take a look?

@fasterthanlime fasterthanlime added a commit that closed this pull request Jul 10, 2015
@fasterthanlime fasterthanlime Closes #897 e881785
@fasterthanlime
Collaborator

Eh, not sure what was wrong with travis..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment