8000 Object not found when invoking a local function. · Issue #862 · sarl/sarl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Object not found when invoking a local function. #862
Closed
@gallandarakhneorg

Description

@gallandarakhneorg

Describe the bug
The code below has a compilation error on the call to sendPing within the on Initialize.

agent PingAgent {
	uses Logging, DefaultContextInteractions

	var pingIndex = 0
	
	var partner : UUID

	on Initialize {
		sendPing()
	}

	on AgentSpawned [partner === null
		&& typeof(PongAgent).name == occurrence.agentType] {
		partner = occurrence.source.UUID
		partner.sendPing
	}

	on Pong {
		occurrence.source.UUID.sendPing
	}
	
	def sendPing(counterpart : UUID = null) {
		var idx = this.pingIndex
		this.pingIndex++
		info("Send ping #" + idx)
		if (counterpart === null) {
			new Ping(idx).emit
		} else {
			assert counterpart !== null
			new Ping(idx).emit[it.UUID == counterpart]
		}
	}

}

The error is : "The method sendPing() from the type PingAgent refers to the missing type Object"/

System configuration:
-- SARL version: 0.8.1
-- SARL compiler:

    • Eclipse compiler without Maven
    • Eclipse compiler with Maven
    • Maven compiler on the command line
    • sarlc compiler
      -- Java JDK version (with the manufacturer name):
      -- Operating System:
    • Linux 64bits
    • Linux 32bits
    • Windows 64bits
    • Windows 32bits
    • MacOS 64bits

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0