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