<commit_before>// xfail-stage0

// Since the bogus configuration isn't defined main will just be
// parsed, but nothing further will be done with it
#[cfg(bogus)]
fn main() { fail }

fn main() {}<commit_msg>Add more tests for conditional compilation. Issue #489<commit_after>// xfail-stage0

#[cfg(bogus)]
const bool b = false;

const bool b = true;

#[cfg(bogus)]
native "rust" mod rustrt {
  // This symbol doesn't exist and would be a link error if this
  // module was translated
  fn bogus();
}

native "rust" mod rustrt {
}

#[cfg(bogus)]
type t = int;

type t = bool;

#[cfg(bogus)]
tag tg {
  foo;
}

tag tg {
  bar;
}

#[cfg(bogus)]
obj o() {
  fn f() { ret bogus; }
}

obj o() {
}

#[cfg(bogus)]
resource r(int i) {}

resource r(int i) {}

#[cfg(bogus)]
mod m {
  // This needs to parse but would fail in typeck. Since it's not in
  // the current config it should not be typechecked.
  fn bogus() { ret 0; }
}

mod m {

  // Submodules have slightly different code paths than the top-level
  // module, so let's make sure this jazz works here as well
  #[cfg(bogus)]
  fn f() {}

  fn f() {}
}

// Since the bogus configuration isn't defined main will just be
// parsed, but nothing further will be done with it
#[cfg(bogus)]
fn main() { fail }

fn main() {
  // Exercise some of the configured items in ways that wouldn't be possible
  // if they had the bogus definition
  assert b;
  let t x = true;
  let tg y = bar;
}

{'fraction_non_alphanumeric': 0.12831241283124128, 'fraction_numerical': 0.0041841004184100415, 'mean_word_length': 3.1, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3387148', 'n_tokens_mistral': 514, 'n_tokens_neox': 510, 'n_words': 209}