hughperman / pure-lang

Automatically exported from code.google.com/p/pure-lang
0 stars 0 forks source link

Type tag in matrix comprehension -> appcrash #88

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Pure 0.55 (i686-pc-mingw32) Copyright (c) 2008-2012 by Albert Graef
(Type 'help' for help, 'help copying' for license information.)
Loaded prelude from C:/NonPortable/Pure/lib/prelude.pure.

> {x::int | x=1..10};
terminate called after throwing an instance of 'err'

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

---
Problemsignatur:
  Problemereignisname:  APPCRASH
  Anwendungsname:   pure.exe
  Anwendungsversion:    0.0.0.0
  Anwendungszeitstempel:    4fccad70
  Fehlermodulname:  libstdc++-6.dll
  Fehlermodulversion:   0.0.0.0
  Fehlermodulzeitstempel:   4d278712
  Ausnahmecode: 40000015
  Ausnahmeoffset:   0001c4ed
  Betriebsystemversion: 6.1.7601.2.1.0.768.3
  Gebietsschema-ID: 2055
  Zusatzinformation 1:  e299
  Zusatzinformation 2:  e2992a57cfead15342693da1e6e6abc3
  Zusatzinformation 3:  1c18
  Zusatzinformation 4:  1c18deb3c6d1c38798ec8e770de5f89c

Original issue reported on code.google.com by nil...@gmail.com on 21 Aug 2012 at 11:53

GoogleCodeExporter commented 8 years ago

Original comment by aggraef@gmail.com on 21 Aug 2012 at 2:36

GoogleCodeExporter commented 8 years ago
Yes, I forgot to catch a possible error condition in the parser there, this 
should give you a "misplaced type tag" error. I'm currently testing a fix, 
thanks for reporting.

Original comment by aggraef@gmail.com on 22 Aug 2012 at 6:01

GoogleCodeExporter commented 8 years ago
This issue was closed by revision 1552b29c7acb.

Original comment by aggraef@gmail.com on 22 Aug 2012 at 6:12

GoogleCodeExporter commented 8 years ago
Ok, this gives you a proper error message now:

> {x::int | x=1..10};
<stdin>, line 1: error in expression (misplaced type tag 'int')

Note that if you really wanted to place a type tag on x, it must be placed on 
the lhs of the binding clause:

> {x | x::int=1..10};
{1,2,3,4,5,6,7,8,9,10}

Original comment by aggraef@gmail.com on 22 Aug 2012 at 6:15