Ticket #33 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

Check for conflicting projection functions.

Reported by: benl Owned by: erikd
Priority: normal Milestone: 0.1.4
Component: Build System Version: 0.1.2
Keywords: Cc:

Description

In this program, the custom "name" field conflicts with the default one from the type definition.

data Fish %r1
	= Fish { 
		name 	:: String %r1; 
		age	:: Int %r1 
	};

project Fish where
	name = "fred"

Change History

Changed 5 years ago by benl

Test is 33-FieldCollision

benl@humboldt:~/devel/ddc/ddc-head-work$ bin/ddc -c test/Broken-skip/FieldCollision/Fish.ds 
./test/Broken-skip/FieldCollision/Fish.ddc.c: In function ‘_ddcInitModule_Fish’:
./test/Broken-skip/FieldCollision/Fish.ddc.c:15: error: too few arguments to function ‘Fish_project_Fish_name’
./test/Broken-skip/FieldCollision/Fish.ddc.c: In function ‘Fish_project_Fish_name’:
./test/Broken-skip/FieldCollision/Fish.ddc.c:21: error: number of arguments doesn’t match prototype
./test/Broken-skip/FieldCollision/Fish.ddc.h:65: error: prototype declaration
./test/Broken-skip/FieldCollision/Fish.ddc.c: At top level:
./test/Broken-skip/FieldCollision/Fish.ddc.c:51: error: redefinition of ‘Fish_project_Fish_name’
./test/Broken-skip/FieldCollision/Fish.ddc.c:21: error: previous definition of ‘Fish_project_Fish_name’ was here

Changed 5 years ago by erikd

  • owner set to erikd

Fix in progress.

Changed 5 years ago by erikd

  • status changed from new to closed
  • resolution set to fixed

Fixed in the following two patches:

Sun Nov 15 11:34:15 EST 2009 Erik de Castro Lopo <erikd@…>

  • Move test/Broken-skip/T33-FieldCollision? to test/01-Error/20-Desugar and update.

Sun Nov 15 11:11:50 EST 2009 Erik de Castro Lopo <erikd@…>

  • Fix #33 : Report error on projection name collision.

Name collision is detected when projecting over both local and imported data types.

Note: See TracTickets for help on using tickets.