use of pack1.P1 in project ceylon by eclipse.
the class CMain method test.
void test() {
P1 p1 = new P1();
// These are NOT errors, and should NOT be detected, as observed.
/*------------------------------------*
Baz.Quux z = null;
Baz.Quux.Quem y = null;
*------------------------------------*/
// ERROR - 'P1.Foo' not accessible
P1.Foo.Bar x = null;
// ERROR - Type of 'a' not accessible
int i = p1.a.length;
// The type of the expression from which a component
// is selected must be accessible.
// ERROR - Type of 'p1.p2' not accessible.
p1.p2.privatei = 3;
// ERROR - Type of 'p1.p2' not accessible.
System.out.println(p1.p2.privatei);
}
use of pack1.P1 in project xtext-core by eclipse.
the class ActionTestLanguage3SemanticSequencer method sequence.
@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
EPackage epackage = semanticObject.eClass().getEPackage();
ParserRule rule = context.getParserRule();
Action action = context.getAssignedAction();
Set<Parameter> parameters = context.getEnabledBooleanParameters();
if (epackage == ActionLang3Package.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case ActionLang3Package.ENTRY:
sequence_ProductionRule2(context, (Entry) semanticObject);
return;
case ActionLang3Package.P1:
sequence_ProductionRule1_P2_2(context, (P1) semanticObject);
return;
case ActionLang3Package.P2:
sequence_ProductionRule1_P3_4(context, (P2) semanticObject);
return;
case ActionLang3Package.P3:
sequence_ProductionRule1(context, (P3) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of pack1.P1 in project xtext-core by eclipse.
the class P2Impl method basicSetP.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetP(P1 newP, NotificationChain msgs) {
P1 oldP = p;
p = newP;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ActionLang3Package.P2__P, oldP, newP);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of pack1.P1 in project ceylon by eclipse.
the class QualifiedAccess_1 method test1.
void test1() {
// Inaccessible types in local variable declarations.
// These exercise 'FieldExpression.checkCommon'.
//
// Fields 'P3' and 'P5' are inaccessible.
P1 foo = null;
// ERROR
P1.P3 bar = null;
// ERROR
P1.P3.P4 baz = null;
// ERROR
P1.P3.P4.P5 quux = null;
}
use of pack1.P1 in project ceylon-compiler by ceylon.
the class QualifiedAccess_1 method test1.
void test1() {
// Inaccessible types in local variable declarations.
// These exercise 'FieldExpression.checkCommon'.
//
// Fields 'P3' and 'P5' are inaccessible.
P1 foo = null;
// ERROR
P1.P3 bar = null;
// ERROR
P1.P3.P4 baz = null;
// ERROR
P1.P3.P4.P5 quux = null;
}
Aggregations