public void RubyProcArgConversion1() {
AssertOutput(delegate() {
CompilerTest(@"
class C
def to_proc
lambda { |x| puts x }
end
end
class D
def to_proc
lambda { |x| puts x + 1 }
end
end
class E
end
1.times(&C.new)
1.times(&D.new)
1.times(&E.new) rescue puts 'error'
");
}, @"
0
1
error
");
}