Bug 26888 - Infamous constructor bug
Summary: Infamous constructor bug
Status: RESOLVED FIXED
Alias: None
Product: poke
Classification: Unclassified
Component: default (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-14 14:03 UTC by Jose E. Marchesi
Modified: 2022-07-11 18:41 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jose E. Marchesi 2020-11-14 14:03:45 UTC
+ (Foo{}).bar fails in the code below.  This is the infamous bug related
+ to nested types and constructors.
+ 
+ type Foo =
+   struct
+   {
+     int i;
+ 
+     fun foo = int:
+       {
+         return i + 1;
+       }
+       
+     method bar = int:
+       {
+         type Bar =
+           struct
+           {
+             int j;
+             method bar = int: { return j + 1; }
+           };
+         
+         fun jorl = int:
+         {
+           return (Bar { j = 1 }).bar;
+         }
+ 
+         return jorl + i;
+       }
+   };
Comment 1 Jose E. Marchesi 2020-11-21 18:04:20 UTC
This is now fixed in master.
Salud!