mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-11 21:57:55 +00:00
b6347771b1
out of r246201). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246203 91177308-0d34-0410-b5e6-96231b3b80d8
18 lines
351 B
Plaintext
18 lines
351 B
Plaintext
# RUN: Kaleidoscope-Ch4 < %s 2>&1 | FileCheck %s
|
|
|
|
# Test basic definition, binding, and execution.
|
|
def foo(x) x + 1;
|
|
def bar(x) foo(2 * x);
|
|
bar(2);
|
|
# CHECK: Evaluated to 5.000000
|
|
|
|
# Test redefinition.
|
|
def foo(x) x + 2;
|
|
foo(2);
|
|
# CHECK: Evaluated to 4.000000
|
|
|
|
# Verify that 'bar' still calls the original 'foo'.
|
|
bar(2);
|
|
# CHECK: Evaluated to 5.000000
|
|
|