Opened 11 years ago

Closed 10 years ago

Last modified 8 years ago

#33 closed defect (fixed)

Check for conflicting projection functions.

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


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 (4)

comment:1 Changed 11 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

comment:2 Changed 10 years ago by erikd

  • Owner set to erikd

Fix in progress.

comment:3 Changed 10 years ago by erikd

  • Resolution set to fixed
  • Status changed from new to closed

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.

comment:4 Changed 8 years ago by benl

  • Milestone 0.1.4 deleted

Milestone 0.1.4 deleted

Note: See TracTickets for help on using tickets.