Home | History | Annotate | Download | only in Kaleidoscope
      1 # RUN: Kaleidoscope-Ch4 < %s 2>&1 | FileCheck %s
      2 
      3 # Test basic definition, binding, and execution.
      4 def foo(x) x + 1;
      5 def bar(x) foo(2 * x);
      6 bar(2);
      7 # CHECK: Evaluated to 5.000000
      8 
      9 # Test redefinition.
     10 def foo(x) x + 2;
     11 foo(2);
     12 # CHECK: Evaluated to 4.000000
     13 
     14 # Verify that 'bar' still calls the original 'foo'.
     15 bar(2);
     16 # CHECK: Evaluated to 5.000000
     17 
     18