Hi Ishaan --

Thanks for filing these bugs.

For bug 1:

* I definitely agree that it shouldn't generate an internal error (nothing
   should).

* I think the heart of the immediate error is that you're assigning a
   lambda expression (whose type is effectively "a function") to a
   variable whose type is 'single bool'.  Assigning the lambda to a new
   variable works around this internal error.  For example, closer to
   what I think you want is arguably:

         var myfn = lambda(retval1):bool{
                 return true;
         };
         temp1$ = myfn(retval1);

* Then I get an illegal access of a first class function which is because
   the formal argument doesn't have a type declared for it.  Giving it one
   makes things compile for me:

         var myfn = lambda(retval1: int):bool{
                 return true;
         };
         temp1$ = myfn(retval1);

   (note that you've got two symbols named 'retval1' in this program
   which are independent: the variable and the formal argument.  Probably
   renaming one of them would be clearer, but I didn't do that here).


For bug 2:

* I think your diagnosis is spot on.  Specifically, removing the 'begin'
   makes things work as you'd expect.


I'm going to file bugs against these after lunch, though I don't expect to 
have time to dive into trying to fix any of them myself in short order... 
If they're holding you up in a big way, let us know.

-Brad



On Mon, 21 Mar 2016, Ishaan Kumar wrote:

> Hi
>
> I am a GSOC'16 aspirant and while tinkering with the language for the
> project of my interest I came across two bugs. I think one of the bugs is a
> known issue.
>
> The detailed report about the two bugs can be found here
> https://github.com/eeishaan/chapel/blob/master/bug-report
>
> Please ignore and forgive if these are already known issues.
>
> Thank You
> Ishaan Kumar
>

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Chapel-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-bugs

Reply via email to