Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Problema de escopo
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Priscylla Silva  
View profile   Translate to Translated (View Original)
 More options Aug 17 2012, 5:03 pm
From: Priscylla Silva <mss.priscy...@gmail.com>
Date: Fri, 17 Aug 2012 18:03:36 -0300
Local: Fri, Aug 17 2012 5:03 pm
Subject: Problema de escopo

Olá pessoal,

Estou tentando executar feito em scala, mas ele contem um erro em um dos
arquivos.
O arquivo Expression.scala contém o seguinte erro:

Description Resource Path Location Type
private trait AtomGenerator escapes its defining scope as part of type
Option[see.parser.Expressions.AtomGenerator] Expression.scala
/See/src/see/parser line 290 Scala Problem

Estou enviando em anexo o arquivo em anexo.
Se alguém puder me ajuda a entender e/ou resolver este erro eu agradeço
bastante.

Abraços a todos,

--
Priscylla Silva
Undergraduate in Computer Science
Institute of Computing - Federal University of Alagoas - UFAL
Estrutura OPEN - http://estruturaopen.com/

  Expression.scala
13K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Sant'ana  
View profile   Translate to Translated (View Original)
 More options Aug 19 2012, 11:18 am
From: "Thomas Sant'ana" <maill...@gmail.com>
Date: Sun, 19 Aug 2012 12:18:39 -0300
Local: Sun, Aug 19 2012 11:18 am
Subject: Re: [scala-br] Problema de escopo

Olha a mensagem parece indicar que voce está pegando o trait AtomGenerator,
que é interno ao object Expression e passando para fora do contexto.

Se voce quer retornar um generator ele tem que ser public.

Ao tentar compilar isso...

object Alpha {
  private trait Gama

}

class Alpha {
  import Alpha._
  def getGama:Option[Gama] = None

}

Temos:

error: private trait Gama escapes its defining scope as part of type
Option[Alpha.Gama]
def getGama:Option[Gama] = None

Assim functiona:

object Alpha {
  trait Gama

}

class Alpha {
  import Alpha._
  def getGama:Option[Gama] = None

}

Note que isso também não funciona;

private object Alpha {
  trait Gama

}

Logo se você quer retornar o objeto/trait tem que ser public.

2012/8/17 Priscylla Silva <mss.priscy...@gmail.com>


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »