code: def test_using_a_derived_source_type_created_after_generator_already_used():
      """
        Regression test for a Boost Build bug causing it to not use a generator
      with a source type derived from one of the generator's sources but created
      only after already using the generateor.
  
      """
      t = BoostBuild.Tester()
  
      t.write("dummy.xxx", "Hello. My name is Peter Pan.\n")
  
      t.write(
          "jamroot.jam",
          """\
  import common ;
  import generators ;
  import type ;
  type.register XXX : xxx ;
  type.register YYY : yyy ;
  generators.register-standard common.copy : XXX : YYY ;
  
  # Building this dummy target must not cause a later defined XXX2 target type not
  # to be recognized as a viable source type for building YYY targets.
  yyy dummy : dummy.xxx ;
  alias the-test-output : Other//other ;
  """,
      )
  
      t.write("Other/source.xxx2", "Hello. My name is Tinkerbell.\n")
  
      t.write(
          "Other/jamfile.jam",
          """\
  import type ;
  type.register XXX2 : xxx2 : XXX ;
  # We are careful not to do anything between defining our new XXX2 target type
  # and using the XXX --> YYY generator that could potentially cover the Boost
  # Build bug by clearing its internal viable source target type state.
  yyy other : source.xxx2 ;
  """,
      )
  
      t.run_build_system()
      t.expect_addition("bin/dummy.yyy")
      t.expect_addition("Other/bin/other.yyy")
      t.expect_nothing_more()
  
      t.cleanup()
  
label_desc: Use image node_id 2 for calling a global function with example usage: test_using_a_derived_source_type_created_after_generator_already_used() without return types