The Vala compiler does not like being fed the same .vapi multiple times.pull/1779/merge
parent
1472f419ea
commit
9b5df6e442
5 changed files with 56 additions and 4 deletions
@ -0,0 +1,11 @@ |
||||
namespace App { |
||||
public static int main(string[] args) { |
||||
var person = new Person(); |
||||
print("Favorite beer of \"%s\" is %s\n", person.name, person.favorite_beer.flavor); |
||||
|
||||
var beer = new Beer("tasty"); |
||||
print("This beer is %s\n", beer.flavor); |
||||
|
||||
return 0; |
||||
} |
||||
} |
@ -0,0 +1,10 @@ |
||||
public class Beer : Object { |
||||
public string flavor { |
||||
get; |
||||
construct; |
||||
} |
||||
|
||||
public Beer(string flavor) { |
||||
Object(flavor: flavor); |
||||
} |
||||
} |
@ -0,0 +1,15 @@ |
||||
project('vapi consumed twice', 'vala', 'c') |
||||
|
||||
base_deps = [dependency('glib-2.0'), dependency('gobject-2.0')] |
||||
|
||||
beer = library('beer', 'beer.vala', dependencies : base_deps) |
||||
beer_dep = declare_dependency(link_with : beer) |
||||
|
||||
person = library('person', 'person.vala', link_with : beer, |
||||
dependencies : base_deps) |
||||
person_dep = declare_dependency(link_with : person, dependencies : [beer_dep]) |
||||
|
||||
app = executable('app', 'app.vala', |
||||
dependencies : base_deps + [person_dep, beer_dep]) |
||||
|
||||
test('valavapiconsumedtwicetest', app) |
@ -0,0 +1,16 @@ |
||||
public class Person : Object { |
||||
public string name { |
||||
get { |
||||
return "Joe Badger"; |
||||
} |
||||
} |
||||
|
||||
public Beer favorite_beer { |
||||
get; |
||||
construct; |
||||
} |
||||
|
||||
public Person() { |
||||
Object(favorite_beer: new Beer("smooth")); |
||||
} |
||||
} |
Loading…
Reference in new issue